[ltp] HAL and ThinkVantage

Damjan linux-thinkpad@linux-thinkpad.org
Thu, 23 Oct 2008 23:44:05 +0200


Hi all.
When I press the ThinkVantage button on my X60s I get an ACPI event and
an  input event:
# acpi_listen 
ibm/hotkey HKEY 00000080 00001018
# /usr/local/bin/input-events 10
/dev/input/event10
   bustype : BUS_HOST
   vendor  : 0x17aa
   product : 0x5054
   version : 16641
   name    : "ThinkPad Extra Buttons"
   phys    : "thinkpad_acpi/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_SW

waiting for events
23:33:36.639925: EV_KEY KEY_VENDOR pressed
23:33:36.641465: EV_SYN code=0 value=0
23:33:36.641811: EV_KEY KEY_VENDOR released
23:33:36.642152: EV_SYN code=0 value=0

Exactly the same happens for the volume buttons too.

Now the problem...
While the volume buttons are reported by HAL too (lshal -m) the
ThinkVantage is not.
To make the volume buttons generate HAL events I had to add
    <append key="input.keymap.data"
        type="strlist">0x14:volumeup</append> <!-- Volume Up button -->
    <append key="input.keymap.data"
        type="strlist">0x15:volumedown</append> <!-- Volume Down button -->
    <append key="input.keymap.data"
        type="strlist">0x16:mute</append> <!-- Mute button -->
to the X60 section of
/usr/share/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi
(which I copied from the T60 section).

Now the question is whats the correct keymap data for the ThinkVantage
button? It's not 0x17!

The input event value for volume-up is 
#define KEY_VOLUMEUP            115
and in HAL we have 0x14?!?

For ThinkVantage
#define KEY_VENDOR              0x168
(it's hex now)

what's the HAL keymap??



-- 
damjan | дамјан
This is my jabber ID -->         damjan@bagra.net.mk 
 -- not my mail address, it's a Jabber ID --^ :)