Disable Touchpad via FN key (Asus Laptop)

6,354

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.

Share:
6,354

Related videos on Youtube

TiloBunt
Author by

TiloBunt

I'm currently blank :-)

Updated on September 18, 2022

Comments

  • TiloBunt
    TiloBunt over 1 year

    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

    • andrybak
      andrybak over 9 years
      It seems to be a bug in Ubuntu. It stopped working for me too (Asus K52JC). In this question second answer suggests different ways to patch this.
    • TiloBunt
      TiloBunt over 9 years
      tried xev -event keyboard and xev but on FN+F9 nothing, other key display something in the terminal.
    • Jonathan Hagen
      Jonathan Hagen over 9 years
      Same issue here on an Asus n56vz.