The Acer Aspire 5920 has a set of touch-sensitive media buttons on the right hand side of the keyboard, which I’m trying to get working. I used the guide at synaptic touchpad on acer 5920 - two touchpads? - Ubuntu Forums to get them recognised by the system, and after quite a bit of hassle, they are recognised.
Unfortunately they seem to be detected as mouse buttons, which is annoying 'cos they are touch-sensitive and it’s very easy to brush them when typing! Also, I can’t figure out a way of using mouse events to control Amarok.
So, my question is, how do I persuade X to interpret mouse button presses from a specific device as keyboard buttons (ideally I would like them to have the same functionality as the FN+Home/PgUp/PgDn/End buttons, which are apparently mapped to XF86AudioPlay XF86AudioStop etc.)
My first thought was to find out the button ids & use xbindkeys or xmodmap to do the mapping, but xbindkeys -k doesn’t recognise the presses.
The output from xev for a press on the play button is as follows
ButtonPress event, serial 34, synthetic NO, window 0x1000001,
root 0x103, subw 0x0, time 2787683, (115,136), root:(119,162),
state 0x0, button 1, same_screen YES
ButtonRelease event, serial 34, synthetic NO, window 0x1000001,
root 0x103, subw 0x0, time 2787805, (115,136), root:(119,162),
state 0x100, button 1, same_screen YES
which would be fine if it wasn’t the same as the output for my touchpad & usb mouse! Is there a way of telling xbindkeys/xmodmap to only remap events from a specific device, and if so, how do you identify that device?
My xorg.conf:
Section "ServerLayout"
Identifier "Layout[all]"
Screen "Screen[0]" 0 0
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Touchpad"
InputDevice "USBMouse"
InputDevice "AcerMediaKeys"
Option "Clone" "off"
Option "Xinerama" "off"
EndSection
Section "Files"
=======TRUNCATED========
EndSection
Section "Module"
Load "dbe"
Load "type1"
Load "freetype"
Load "extmod"
Load "glx"
EndSection
Section "ServerFlags"
Option "AllowMouseOpenFail" "on"
Option "ZapWarning" "on"
EndSection
Section "InputDevice"
Identifier "Keyboard[0]"
Driver "kbd"
Option "Protocol" "Standard"
Option "XkbLayout" "gb"
Option "XkbModel" "microsoftpro"
Option "XkbRules" "xfree86"
EndSection
Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "CorePointer"
Option "Protocol" "event"
Option "Device" "/dev/input/eventtouchpad"
Option "MaxTapTime" "100"
Option "MaxTapMove" "220"
Option "AccelFactor" "0.05"
Option "SHMConfig" "true"
EndSection
Section "InputDevice"
Identifier "UsbMouse"
Driver "mouse"
Option "Buttons" "7"
Option "Device" "/dev/input/mice"
Option "SendCoreEvents" "true"
Option "Name" "Microsoft Trackball Optical"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "AcerMediaKeys"
Driver "evdev
Option "Device" "/dev/input/eventkeys"
Option "SendCoreEvents" "true"
EndSection
Section "Modes"
Identifier "Modes[0]"
EndSection
Section "Monitor"
Identifier "Monitor[0]"
VendorName "--> LCD"
ModelName "1280X800@60HZ"
UseModes "Modes[0]"
DisplaySize 332 207
HorizSync 30.0 - 52.0
VertRefresh 50.0 - 60.0
Option "CalcAlgorithm" "XServerPool"
Option "DPMS"
Option "PreferredMode" "1024x768"
EndSection
Section "Device"
Identifier "Device[0]"
Driver "nvidia"
VendorName "NVidia"
BoardName "GeForce 8600M GS"
EndSection
Section "Screen"
=======TRUNCATED========
EndSection
Section "Extensions"
Option "Composite" "off"
EndSection
Section "Monitor"
Option "CalcAlgorithm" "XServerPool"
DisplaySize 332 207
HorizSync 30-52
Identifier "Monitor[0]"
ModelName "1280X800@60HZ"
Option "DPMS"
Option "PreferredMode" "1280x800"
VendorName "--> LCD"
VertRefresh 50-60
UseModes "Modes[0]"
EndSection
Section "Modes"
Identifier "Modes[0]"
EndSection
Section "Screen"
=======TRUNCATED========
EndSection
Section "Device"
BoardName "GeForce 8600M GS"
Driver "nvidia"
Identifier "Device[0]"
Screen 0
VendorName "NVidia"
EndSection
Section "DRI"
Group "video"
Mode 0660
EndSection
Section "Extensions"
Option "Composite" "off"
EndSection
Anyone got any ideas?