How to use events for special laptop buttons

Marco Pallotta marco.pallotta at gmail.com
Sun Jan 17 21:19:33 UTC 2010


Il giorno dom, 17/01/2010 alle 04.47 +0000, MPR ha scritto:
> 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.


Have you tried with gnome-keybinding-properties tool?

I think the problem of not defined special keys should be solved with a
gui the should be displayed, when "unknown key released" is detected, to
help the user to customize the keys (as I proposed on 2009-01-01 in
comment #12 of bug 111024
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/111024)

> 
> 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
> 
-- 
==================================================
MARCO PALLOTTA
 
e-mail: marco.pallotta at gmail.com

CHAT:
msn #: pallotta at inwind.it
googletalk #: marco.pallotta at gmail.com
skype #: marco.pallotta
 
Public GPG key: hkp://keyserver.ubuntu.com:11371
==================================================





More information about the Ubuntu-devel-discuss mailing list