Touchpad toggle mess

Bastien Nocera hadess at
Thu Nov 4 17:00:09 PDT 2010


In GNOME 2.32, we added support for touchpad toggle buttons, by
capturing the XF86TouchpadToggle button in gnome-settings-daemon,
showing a nice popup, and disabling the touchpad in software.

That works great for a number of laptops, but completely breaks a number
of others where the hardware handles the request, but still sends a key
event (usually separate ones for on and off). In those cases, we'd need
2 more key types, in the kernel, and in

The patches in
implement this for the kernel, and for

Then we have the problem that udev's keymaps seem to use different
function keys depending on the hardware [1], when (because of the
limitations of XKB) standardised on F22 for "XF86TouchpadToggle".

So we'll need to standardise on the keys used. I selected F21 for
XF86TouchpadToggle, F22 for XF86TouchpadOn and F23 for XF86TouchpadOff.
See the patch in:

The remaining fixes would need to be in udev's keymaps, to set hardware
handled keys to F22 and F23, and software ones to F21. Patch is attached
for that.

Questions, comments?

[1]: F21, F22, or F23 then?
$ grep -ri touchpad extras/keymap/keymaps/
extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint:0x90017 f22 # Fn+F8  touchpadtoggle
extras/keymap/keymaps/zepto-znote:0xA5 f22                # Fn+F6 Disable Touchpad
extras/keymap/keymaps/zepto-znote:0xA6 f22                # Fn+F6 Enable Touchpad
extras/keymap/keymaps/hewlett-packard-pavilion:0xD8 f22 # touchpad off
extras/keymap/keymaps/hewlett-packard-pavilion:0xD9 f23 # touchpad on
extras/keymap/keymaps/dell:0x9E f22 #touchpad toggle
extras/keymap/keymaps/dell:0xD9 f22 # touchpad toggle
extras/keymap/keymaps/samsung-other:0xF7 f22 # Fn+F10 Touchpad on
extras/keymap/keymaps/samsung-other:0xF9 f22 # Fn+F10 Touchpad off
extras/keymap/keymaps/hewlett-packard-tx2:0xD8 f22 # Toggle touchpad button on tx2 (OFF)
extras/keymap/keymaps/hewlett-packard-tx2:0xD9 f22 # Toggle touchpad button on tx2 (ON)
extras/keymap/keymaps/everex-xt5000:0x65 f22 # Fn+F5 Touchpad toggle
extras/keymap/keymaps/samsung-sx20s:0x77 f21 # FIXME: Touchpad on
extras/keymap/keymaps/samsung-sx20s:0x79 f21 # FIXME: Touchpad off
extras/keymap/keymaps/onkyo:0xF7 f22 # Fn+Y (touchpad toggle)
extras/keymap/keymaps/toshiba-satellite_a110:0x9E f21 # FIXME: Touchpad on
extras/keymap/keymaps/toshiba-satellite_a110:0x9F f21 # FIXME: Touchpad off
extras/keymap/keymaps/toshiba-satellite_m30x:0x9e prog1 #touchpad_enable
extras/keymap/keymaps/toshiba-satellite_m30x:0x9f prog2 #touchpad_disable
extras/keymap/keymaps/acer:0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on)
extras/keymap/keymaps/acer:0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off)
extras/keymap/keymaps/micro-star:0xE4 f22 # Fn-F3   Touchpad disable
extras/keymap/keymaps/module-lenovo:0x7 f22 # Fn+F8 touchpadtoggle
extras/keymap/keymaps/lg-x110:0xE4 f22 # Fn-F5   Touchpad disable
extras/keymap/keymaps/hewlett-packard-2510p_2530p:0xD8 f22 # touchpad off
extras/keymap/keymaps/hewlett-packard-2510p_2530p:0xD9 f23 # touchpad on

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-extras-keymap-Fix-touchpad-toggle-buttons-used.patch
Type: text/x-patch
Size: 8503 bytes
Desc: not available
URL: <>

More information about the xorg mailing list