16

I just mindlessly deactivated my touchpad in Ubuntu 13.04 through the gnome-control-center and have no clue how to activate it again without the use of the touchpad.

Also synclient Touchpadoff=0 doesn't change anything.

Eric Carvalho
  • 54,385
stonehaens
  • 163
  • 1
  • 1
  • 4
  • just found the "xinput list" command. will try it now. – stonehaens Aug 21 '13 at 10:10
  • looked for the device in xinput list and tried to activate it via "xinput set-prop 13 "Device Enabled" 1" ... didn't change anythig. – stonehaens Aug 21 '13 at 10:27
  • Do you mean re-enabling it from control center doesn’t work? – AliNajafies Aug 21 '13 at 10:34
  • since I have no input device to move the cursor it doesn't. – stonehaens Aug 21 '13 at 10:51
  • Extremely embarrassed...

    I had a mouse here that didn't work at all on the surface I was using it on. Got the mouse on a proper Mousepad -> activated the Touchpad through the gnome-control-center -> Everything is fine again.

    Thanks anyway ...

    – stonehaens Aug 21 '13 at 10:58
  • 1
    :D You could use your keyboard to switch it ON. Know for future: Alt+F10 opens top menus. When you went to System Settings > Mouse and Touchpad, you can use Tab key to select the switch and Space to toggle. However I wonder why xinput didn’t work! – AliNajafies Aug 21 '13 at 11:02
  • 1
    @AliNa You could post that as an answer. – Eric Carvalho Aug 21 '13 at 11:15

6 Answers6

28

On Ubuntu 18.04 I had to use from the terminal:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

To get to the Terminal I used the command key and then typed in "terminal" and hit enter. Hope this helps someone else caught with their mouse down.

JoeManFoo
  • 401
16

Ok, let’s be presice. If you disable/switch OFF your touchpad through System Settings (Gnome Control Center) you can’t re-enable it with xinput! When you have no other mouse or pointer device, you have to go to System Settings using your keyboard.

Fortunately, Unity is well designed for both keyboard and mouse, so without a mouse you can still do everything. For example, you can press Alt+F10 to open top menu and then navigate to System Settings with arrow keys. Or simply press Super(or ) to open the Dash and search for mouse. Select it with down arrow key () and press Enter to open.

Search for mouse in Dash

Finally using Tab select the Touchpad switch – the orange box around the switch shows that you’re on the right place. Toggle it ON by hitting Space or Enter.

Switch OFF

AliNajafies
  • 5,874
  • 7
    Tabbing in the mouse/trackpad screen does not highlight anything in Ubuntu 16.10. I had to do tab+enter a bunch of times until it eventually selected the ON button -- but it was not showing me which object was highlighted. Probably a bug. – chovy Dec 03 '16 at 02:00
  • While this 'looks' like a solution it doesn't work in reality for modern versions. Ubuntu 16.10 magically skips the On/Off button for touchpad. – nehem Feb 01 '17 at 22:18
  • 1
    For Ubuntu 18.10 & pure terminal solution, see the post below about "gsettings" – ŁukaszBachman Feb 17 '19 at 21:13
7

Tabbing in the mouse/trackpad screen does not highlight anything in Ubuntu 16.10 for me (brand new install).

I had to do tab+enter a bunch of times until it eventually selected the ON button and enabled it -- but it was not showing me which object was highlighted. Probably a bug.

chovy
  • 317
  • This must replace the accepted answer. – nehem Feb 01 '17 at 22:27
  • I found the same thing in Ubuntu 16.04 with gnome. After I disabled the touch pad, that part of the mouse/trackpad settings was no longer displayed so I couldn't see an option to reenable it. Rebooting didn't help. – Brian Borchers Jun 30 '17 at 22:13
  • You're a saviour! Spent 1 hour in a cafe just trying to get the touchpad back working. – Pithikos Jan 18 '20 at 14:51
4

I have Linux Mint 18 installed with kernel 4.4.0-45. I did the following to make it easy to toggle the touchpad state.

$ sudo apt-get install xinput

$ xinput -list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MOSART Semi. 2.4G Keyboard Mouse          id=11   [slave  pointer  (2)]
⎜   ↳ **FTE1001:00 0B05:0101**               ***id=14***   [slave  pointer  (2)]
  • Look for the id of the touchpad, in my case it's 14. I wrote a small shell script to turn the touchpad off and on.

  • TouchPad off:

    $ cd /usr/local/bin
    $ sudo nano touchpad-off
    
    #!/bin/bash
    # touchpad off
    xinput --set-prop 14 "Device Enabled" 0
    echo touchpad off
    
  • TouchPad on:

    $ cd /usr/local/bin
    $ sudo nano touchpad-on
    
    #!/bin/bash
    # touchpad on
    xinput --set-prop 14 "Device Enabled" 1
    echo touchpad on
    
  • Make the scripts executable with:

    chmod +x touchpad-off
    chmod +x touchpad-on
    

    Now you can easily toggle the touchpad state with touchpad-off and touchpad-on in your terminal.

galoget
  • 2,963
0

I have found that xinput works the best for switching touchpad on/off on my linux mint 18.3 Jumper Ezbook 3 Pro (4.10.0.38 kernel) versus using GUI System setings -> Mouse and touchpad -> Touchpad -> On/Off slider

I used script provided in above answer by Seth Bergman, but wanted to share 2 improvements to it.

1) Id of the device sometimes change, so you cant have it like fixed number in your script. Sometimes id=14, and sometimes 15.

⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SYNA3602:00 0911:5288 Touchpad id=15 [slave pointer (2)]

#!/bin/bash
# touchpad off
DeviceID=$(xinput -list | grep Touchpad | awk '{print $6}' | sed 's/id=//')
xinput --set-prop $DeviceID "Device Enabled" 1
echo touchpad on

Of course you should change 'Touchpad' to the name or number of your Touchpad Device. That way, whatever the device id becomes, the script will always work.

2) You can make a shortcut to your scripts to use them quickly. In Linux Mint you should go to the Menu -> System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts -> Add Custom Shortcut. In command field just paste the path to your script file like that: /usr/local/bin/touchpad-on and name of choice.

And the add key-bindings of choise.

et voilà!

0
  1. Press the Menu key on your keyboard.
  2. Navigate down to the Change Desktop Background option and hit ENTER
  3. Using the TAB key, navigate to the "all settings" page and the search field.
  4. Type Mouse and use TAB and ENTER to select it.
  5. Use the TAB key to go down to the toggle switch in the Touchpad section, and use SPACE to mark it as on.

Your touchpad should be re-enabled.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
  • To save on a lot of steps, you can also use the Win/Meta key, type Mouse, hit enter, and then use TAB to navigate down to the touchpad toggle, which is exactly what the accepted answer says. – Kaz Wolfe Jul 09 '17 at 02:51