3

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

TiloBunt
  • 2,305
  • 2
  • 27
  • 36

2 Answers2

1

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.

0

open a terminal and write "gedit toggle_touchpad.sh"

#!/bin/bash
condition="$(gsettings get org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled)"

if [ "$condition" == "false" ]; then
     gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled true
elif [ "$condition" == "true" ]; then
    gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled false
fi

Save the file and exit. Now you have a file with the name "toggle_touchpad.sh"

Run the command chmod +x toggle_touchpad.sh to make the file executable.

Place the file in any folder you like. Let us assume that you have it in the folder /home/username/myscripts/.

From the menu on the top-right go to system-settings->keyboard->shortcuts->custom-shortcuts.

Create a new shortcut and put as name whatever you want. Put as command /home<username>;/myscripts/toggle_touchpad.sh where "username" is your username

Assign whatever keyboard shortcut you want.

Ready :)

P.S. Personally I put the file in the /opt/myscripts/ folder but in order to put it there you should run the following commands after creating the file:

sudo mkdir /opt/myscripts/

sudo mv toggle_touchpad.sh /opt/myscripts/

sudo chown <username>:<username> /opt/myscripts/toggle_touchpad.sh

chmod +x  /opt/myscripts/toggle_touchpad.sh

where "username" is your username

Then when you will create the shortcut you will use the path "/opt/myscripts/toggle_touchpad.sh" instead of the one mentioned above

orestis
  • 1,408