Hi, laptop linux users. Most laptop have a touchpad problem that it sometimes is touched when pressing keys, which annoying me when I making codes. I realized that I don't need touchpad enabled while eagerly pressing keys, so I decide make a hotkey enable/disable touchpad. ## 1. Open terminal ~~~~ $ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=14 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ Power Button id=9 [slave keyboard (3)] ↳ Logitech USB Receiver id=10 [slave keyboard (3)] ↳ LG HD WebCam id=12 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)] ~~~~ ## 2. Try the command ~~~~ $ xinput set-prop 14 "Device Enabled" "0" ~~~~ Touch pad id is 14 (Elantech Touchpad) Last "0" means disable touch, and "1" enable. ## 3. It's time to make a shell script. Make "toggletouch.sh" in the $PATH directory. ~~~~ #!/bin/bash DNAME="Touchpad" DEV=`xinput --list | grep "$DNAME"|cut -d= -f2|cut -c1,2` STATE=`xinput list-props "$DEV" | grep "Device Enabled" | cut -f3` if [ "$STATE" == "0" ]; then SWITCH="1" else SWITCH="0" fi xinput set-prop "$DEV" "Device Enabled" "$SWITCH" ~~~~ If your touch device doesn't have sub string "Touchpad", you need to change it. DEV is 14 in the above xinput list. STATE catches the current state "0" or "1" ## 4. Test toggletouch.sh ~~~~ $ toggletouch.sh ~~~~ Does it toogle touch enable/disable well? ## 5. Making a Shortcut - Go to System settings -> keyboard -> shortcuts - Add new in Custom Shortcuts { name: toggle touch, command: toogletouch.sh } - Assign a ShortCut (Here shift +alt + T) ![shortcuts.png](https://steemitimages.com/DQmZf6oK5frktPbijWAxkUVjs1t2Ttkop35uvtx2fodn9qL/shortcuts.png) ## 6. Test Shortcut Does shortcut enable/disable touch well? Protect your typing from unintentional touch pad. Thank you.
post_id | 2,108,518 |
---|---|
author | kdj |
permlink | ubuntu-tip-touch-en-disable-hot-key |
category | linux |
json_metadata | "{"app": "steemit/0.1", "format": "markdown", "image": ["https://steemitimages.com/DQmZf6oK5frktPbijWAxkUVjs1t2Ttkop35uvtx2fodn9qL/shortcuts.png"], "tags": ["linux", "ubuntu", "laptop", "touch", "touchpad"]}" |
created | 2017-03-08 16:31:45 |
last_update | 2017-03-08 16:31:45 |
depth | 0 |
children | 1 |
net_rshares | 10,371,204,556,848 |
last_payout | 2017-04-08 17:02:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.670 SBD |
curator_payout_value | 0.177 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,143 |
author_reputation | 4,190,079,105,786 |
root_title | "[Ubuntu Tip] Touch en/disable Hot Key" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
wackou | 0 | 1,179,679,045,105 | 18% | ||
wang | 0 | 461,143,995,201 | 15% | ||
pairmike | 0 | 3,734,722,260 | 1% | ||
pheonike | 0 | 7,602,554,327 | 3.6% | ||
proctologic | 0 | 4,266,785,286 | 1% | ||
konelectric | 0 | 610,969,823 | 1% | ||
patrice | 0 | 2,106,086,391 | 18% | ||
cyan91 | 0 | 76,357,875,271 | 100% | ||
forrestwillie | 0 | 647,354,650 | 1% | ||
brich | 0 | 3,646,388,544 | 18% | ||
juanmiguelsalas | 0 | 28,764,249,590 | 100% | ||
andrei | 0 | 245,681,764 | 1% | ||
fyrstikken | 0 | 52,450,336,447 | 1.5% | ||
grey580 | 0 | 374,383,427 | 1% | ||
heiditravels | 0 | 429,269,638,021 | 100% | ||
good-karma | 0 | 153,624,788,875 | 47% | ||
roelandp | 0 | 35,427,866,624 | 15% | ||
elyaque | 0 | 118,830,471,888 | 100% | ||
anyx | 0 | 53,147,384,734 | 18% | ||
jamesjarman | 0 | 1,705,018,045 | 1% | ||
karenmckersie | 0 | 2,110,036,324 | 1% | ||
pkattera | 0 | 82,162,016,818 | 18% | ||
arcange | 0 | 9,713,091,027 | 18% | ||
mysteem | 0 | 1,291,765,115 | 47% | ||
happyphoenix | 0 | 213,081,496 | 9.4% | ||
kdj | 0 | 229,936,825,104 | 100% | ||
shaka | 0 | 690,684,262,109 | 100% | ||
shortcut | 0 | 40,005,143,582 | 80% | ||
felixxx | 0 | 52,778,735,749 | 100% | ||
twinner | 0 | 1,276,738,083,105 | 100% | ||
timelapse | 0 | 463,086,675 | 1% | ||
ullikume | 0 | 2,319,880,182 | 18% | ||
kopasi | 0 | 1,006,558,811 | 100% | ||
gargon | 0 | 205,321,172,559 | 100% | ||
pgarcgo | 0 | 160,813,644,146 | 100% | ||
wartrapa | 0 | 54,006,539,239 | 100% | ||
darthnava | 0 | 406,606,545 | 1% | ||
virtualgrowth | 0 | 1,922,992,316 | 18% | ||
demo | 0 | 174,441,921 | 47% | ||
albagargon | 0 | 914,808,978 | 100% | ||
runridefly | 0 | 6,960,337,626 | 19% | ||
barrydutton | 0 | 1,601,401,786 | 1% | ||
pollux.one | 0 | 81,186,751,713 | 100% | ||
steemitguide | 0 | 591,814,731 | 1% | ||
uwelang | 0 | 21,872,359,119 | 80% | ||
richardcrill | 0 | 1,444,109,147 | 1% | ||
titin | 0 | 51,810,396,798 | 100% | ||
sponge-bob | 0 | 40,002,814,529 | 5% | ||
ebargains | 0 | 7,395,652,041 | 18% | ||
finleyexp | 0 | 321,226,156 | 47% | ||
patelincho | 0 | 177,202,776 | 1% | ||
brains | 0 | 2,355,217,584 | 5% | ||
feruz | 0 | 172,639,585 | 47% | ||
peccio | 0 | 11,624,493,463 | 100% | ||
jgcastrillo19 | 0 | 81,377,352,869 | 100% | ||
permacryptofolio | 0 | 11,592,429,863 | 100% | ||
juliamateo | 0 | 2,472,055,697 | 100% | ||
thegame | 0 | 104,046,919 | 1.8% | ||
teo | 0 | 3,396,343,998 | 100% | ||
steembets | 0 | 105,662,454 | 1.8% | ||
zoee | 0 | 154,996,013 | 18% | ||
sjennon | 0 | 2,369,259,664 | 18% | ||
lhy | 0 | 21,405,046,957 | 100% | ||
alfredozofio | 0 | 3,509,269,541 | 100% | ||
uhu | 0 | 11,628,093,490 | 100% | ||
freiheit50 | 0 | 34,021,161,515 | 100% | ||
beers | 0 | 44,797,917,808 | 100% | ||
dulcinea | 0 | 4,644,566,149 | 100% | ||
giantbear | 0 | 1,256,538,290 | 1% | ||
stray | 0 | 443,140,162 | 1% | ||
unityofmulti | 0 | 1,633,616,095 | 80% | ||
daisyd | 0 | 319,856,785 | 1% | ||
steemland.com | 0 | 105,670,719 | 1.8% | ||
sqube | 0 | 2,973,645,157 | 1% | ||
whatageek | 0 | 834,826,228 | 1% | ||
votelotto | 0 | 543,921,402 | 100% | ||
steemexwon | 0 | 125,104,506 | 100% | ||
foodmap | 0 | 154,678,274 | 100% | ||
esteemapp | 0 | 179,241,712 | 47% | ||
steemprentice | 0 | 2,286,072,235 | 5.4% | ||
steemperor | 0 | 69,732,024,629 | 100% | ||
steempire | 0 | 124,222,752,682 | 100% | ||
reisman | 0 | 486,146,300 | 18% | ||
bellastella | 0 | 4,667,389,134 | 100% | ||
aniestudio | 0 | 12,439,827,994 | 100% | ||
vcelier | 0 | 155,988,987,919 | 18% | ||
dreemit | 0 | 6,421,247,264 | 9% | ||
meysam | 0 | 549,884,245 | 1% | ||
jphenderson | 0 | 174,223,049 | 18% | ||
driptorchpress | 0 | 86,755,575 | 1% | ||
tamim | 0 | 4,064,913,109,449 | 100% | ||
zkalemiss | 0 | 128,581,897 | 18% | ||
loreennaa | 0 | 732,280,155 | 100% | ||
firesteem | 0 | 600,167,333 | 100% | ||
thedeplorable1 | 0 | 554,995,161 | 1% | ||
bounties | 0 | 309,255,180 | 47% | ||
steempoll | 0 | 233,874,221 | 47% | ||
ogochukwu | 0 | 2,093,236,995 | 47% | ||
steem-munich | 0 | 11,786,904,421 | 100% | ||
smalltalk | 0 | 86,852,380 | 3.6% | ||
steem.map | 0 | 11,622,885,800 | 100% | ||
benjiparler | 0 | 103,479,106 | 18% | ||
agile | 0 | 766,847,404 | 100% | ||
denmarkguy | 0 | 427,247,275 | 1% | ||
sonstiges | 0 | 11,365,324,269 | 100% | ||
danijazmi | 0 | 408,108,226 | 100% | ||
ambyr00 | 0 | 3,014,447,056 | 47% | ||
ducky9605 | 0 | 364,697,388 | 100% | ||
teacher | 0 | 284,521,300 | 100% | ||
evildeathcore | 0 | 69,203,411 | 18% |
https://steemitimages.com/0x0/http://www.reactiongifs.com/r/crwdc.gif
post_id | 15,442,275 |
---|---|
author | salimch |
permlink | re-kdj-ubuntu-tip-touch-en-disable-hot-key-20171016t154856441z |
category | linux |
json_metadata | "{"app": "steemit/0.1", "image": ["https://steemitimages.com/0x0/http://www.reactiongifs.com/r/crwdc.gif"], "tags": ["linux"]}" |
created | 2017-10-16 15:49:00 |
last_update | 2017-10-16 15:49:00 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-10-23 15:49:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 69 |
author_reputation | 1,063,326,571,637 |
root_title | "[Ubuntu Tip] Touch en/disable Hot Key" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |