How to use events for special laptop buttons

MPR mplistarchive at gmail.com
Sun Jan 17 04:47:19 UTC 2010


Hi developers,

I have two buttons on my laptop that currently do nothing. I would
like to use them to do something, preferably execute a program. I've
determined that I can see that they send press and release events when
I use the input-events program. Can someone tell me what I do with
this information? I don't know where to configure this information in
HAL or DeviceKit despite lots of searching and reading. Ideally I
would like to get this working in 10.04 and contribute the changes for
the final release.

Here's the output from a shell:

# sudo input-events 11
/dev/input/event11
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HP WMI hotkeys"
   phys    : "wmi/input0"
   bits ev : EV_SYN EV_KEY EV_SW

waiting for events
14:24:59.128496: EV_KEY KEY_INFO (0x166) pressed
14:24:59.128503: EV_SYN code=0 value=0
14:24:59.128506: EV_KEY KEY_INFO (0x166) released
14:24:59.128509: EV_SYN code=0 value=0

# sudo input-events 4
/dev/input/event4
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43841
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
14:24:23.835501: EV_MSC code=4 value=136
14:24:23.835520: EV_KEY KEY_PRESENTATION (0x1a9) pressed
14:24:23.835526: EV_SYN code=0 value=0
14:24:23.842493: EV_MSC code=4 value=136
14:24:23.842506: EV_KEY KEY_PRESENTATION (0x1a9) released
14:24:23.842510: EV_SYN code=0 value=0




More information about the Ubuntu-devel-discuss mailing list