Author Topic: How to disable your touchpad  (Read 4868 times)

Dan

  • Sr. Member
  • ****
  • Posts: 192
    • View Profile
How to disable your touchpad
« on: October 23, 2015, 11:02:07 AM »
I originally installed wattOS on an older desktop computer...I liked it so much, that I just recently installed it on a newer laptop that I have too.  ;)   :D

Of course, that brought up the need to disable the touchpad while typing. This can be fixed in a couple of ways.

1. If you prefer a GUI tool for this, you can install GPointing Device Settings. It's available through the Synaptic Package Manager, or you can install it with the terminal with the following command...

sudo apt-get install gpointing-device-settings

This works well, but be aware...you will have to mark your settings again each time you reboot or log out of your computer.

2. Instead of a GUI tool, simply add a command to the autostart file. That way, it's permanent.  ;)

First, you need to find the right file. Open your file manager, click View in the tool bar, and click on Show Hidden. Now follow this file path...

.config>lxsession>LXDE>autostart

Now...if you want to simply disable your touchpad while typing, add the following line to the autostart file...

@syndaemon -i 1.0 -d

This is set for a 1 second delay; hence, the 1.0 in the command. That number can be varied to your preference, and can be adjusted by tenths. Such as 1.1, 1.7, 2.5, etc...

However, if you're like me, and you don't want to use your touchpad at all, you can completely disable it by adding this command instead...

@synclient TouchpadOff=1

3. Close the autostart file, and tell it to save the changes. Now log out and log back in to your computer, and your settings will be permanently saved.  ;)
« Last Edit: October 23, 2015, 11:09:37 AM by Dan »

blaze

  • wattOS Veteran
  • Sr. Member
  • ****
  • Posts: 441
  • blazing away
    • View Profile
Re: How to disable your touchpad
« Reply #1 on: October 23, 2015, 06:03:35 PM »
Thanks keep 'em coming  ;)
How To Ask Questions The Smart Way; http://www.catb.org/~esr/faqs/smart-questions.html

... and when SOLVED, please edit thread title in first post! :)

biffster

  • wattOS - head nerd
  • Administrator
  • Sr. Member
  • *****
  • Posts: 237
    • View Profile
Re: How to disable your touchpad
« Reply #2 on: October 26, 2015, 01:48:29 AM »
If you would like to disable via keyboard in i3 simply add a line to bind a keyboard combo in the config file located at at ~/.i3/config (which is what I do on my laptop)

bindsym $mod+F9 exec synclient TouchPadOff=1

In the example above, the windows+F9 key turn off the touchpad.



billwho

  • Full Member
  • ***
  • Posts: 34
    • View Profile
Re: How to disable your touchpad
« Reply #3 on: September 09, 2016, 11:01:58 PM »
I like the touchpad, but often use a mouse.  Sometimes the touchpad is just too sensitive and I need to turn it off.  I do not want it permanently off, so I have a script to toggle it on/off, and bind that to a key in openbox.

# .......1.........2.........3.........4.........5.........6....
# bind to a key in openbox <keyboard> section
# see  http://openbox.org/wiki/Help:Bindings
# see  http://openbox.org/wiki/Help:Actions

# edit  ~/.config/openbox/lxde-rc.xml     # WattOS R10
# edit  ~/.config/openbox/lubuntu-rc.xml  # Lubuntu 16.04.1

# add to the <keyboard> section of openbox
# S-F1 means Shift and F1

<keybind key="S-F1"><action name="Execute">
  <command>~/bin/ToggleTouchpad.sh</command>
</action></keybind>

# then in terminal issue this command to activate
openbox --reconfigure

# create a shell script, I put mine in ~/bin
# one key to TOGGLE touchpad on/off

# .......1.........2.........3.........4.........5.........6....
#!/bin/bash
# ToggleTouchpad.sh
# touchpad states: 0=on 1=off 2=only tapping and scrolling off

ST=$( synclient | grep -o TouchpadOff.* | grep -o [0-2] )
synclient TouchpadOff=$(( ST &1 ^1 )) # and xor # cycle 0 1

# .......1.........2.........3.........4.........5.........6....
# alternates
# synclient TouchpadOff=$(( (ST +1) %2 )) # add mod # cycle 0 1
# synclient TouchpadOff=$((  ST &2  ^2 )) # and xor # cycle 0 2
# synclient TouchpadOff=$(( (ST +1) %3 )) # add mod # cycle 0 1 2

# ST=                     get touchpad status
# $(                      start command substitution
# synclient               command - list current user settings
# |                       send user settings to grep
# grep -o TouchpadOff.*   search settings (-o print only matched parts)
# |                       send found string to next grep
# grep -o [0-2]           search for 0,1,2
# )                       end command substitution
# synclient TouchpadOff=  set new value
# $((                     start arithmetic expansion/evaluation
# ST                      current status
# &                       bitwise and
# 1                       mask bit 0
# ^                       bitwise xor
# 1                       toggle bit 0
# ))                      end arithmetic expansion/evaluation