Ubuntu – Disable Touchpad via FN key (Asus Laptop)

14.04function keyskeyboardshortcut-keystouchpad

Most of my function (Fn) keys I care about work on my Asus G73 (like Volumne up/down, mute, Brightness up/down, Keyboard light up/down, Open Calculator) but the Fn+F9 to disable / enable touch pad does not work.

Info

product: G73Jh
vendor: ASUSTeK Computer Inc.

when I ran acpi_listen and for Vol up, down I get

hotkey ATK0100:00 00000030 00000003
button/volumeup VOLUP 00000080 00000000 K
hotkey ATK0100:00 00000031 00000001
button/volumedown VOLDN 00000080 00000000 K

For the Fn+F9

hotkey ATK0100:00 0000006b 00000004

I know that I can disable / enable touch-pad in the GUI and terminal but would like to get the FN key working.
Hope there is an easier way than this: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?)

Or should I follow this from 2009? (does it still work for 14.04? https://help.ubuntu.com/community/LaptopSpecialKeys

Best Answer

Here's a script I use with an XFCE-handled keyboard shortcut on my ASUS laptop because the touchpad hotkey is the only one that doesn't work:

#!/bin/bash
name="BYD"
tp=`xinput list|grep "$name"|awk -F= '{print $2}'|awk '{print $1}'`
state=`xinput list-props $tp|grep 'Device Enabled'|awk -F\: '{print $2}'|awk '{print $1}'`
(( $state )) && xinput disable $tp || xinput enable $tp

BYD is the weird touchpad that came along with; substitute ALPS or Synaptics or the unique string from any other input device as needed/desired. It should work in any desktop environment as long as X is behind it.

Related Question