Disabling the Lenovo Yoga Touchpad and Keyboard In Fedora

I can't find an easy way to disable the mouse and keyboard on screen flip of the Yoga in Fedora however an easy enough approach is to disable them by hand using xinput.

Issue an: xinput --list

[richie@localhost ~]$ xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:1028       id=9    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]
⎜   ↳ Microsoft Natural® Ergonomic Keyboard 4000        id=15   [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)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Lenovo EasyCamera                         id=11   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=12   [slave  keyboard (3)]
    ↳ Microsoft Natural® Ergonomic Keyboard 4000        id=16   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]
Then look for the id of the mouse and touchpad. Mine are 13 and 14.

With the id's you can then create a simple bash script. The simplest would be to create a file; disable_keyboard_mouse.sh, with the following contents:
#!/bin/bash
xinput set-int-prop 13 "Device Enabled" 8 $1
xinput set-int-prop 14 "Device Enabled" 8 $1
Then issue 'chmod +x disable_keyboard_mouse.sh' and call it with ./disable_keyboard_mouse 0 or ./disable_keyboard_mouse 1 with 1 turning the keyboard and mouse on and 0 turning it off.

Comments

Popular posts from this blog

The SQL Server and .Net equivalent of PHP and MySQL's SHA1 function

AutoItX4Java - Java AutoIt Bridge

RTL8723AU Realtek driver fails after linux update fix.