[ltp] HAL and ThinkVantage
Jens Rutschmann
linux-thinkpad@linux-thinkpad.org
Mon, 22 Dec 2008 15:08:49 +0100
Marius Gedminas wrote on 22.12.2008 14:19:
>> <append key="input.keymap.data" type="strlist">0x17:prog1</append>
>> <append key="info.capabilities" type="strlist">input.keymap</append>
>
> This is awesome. Could you point me towards some documentation about
> this? Where does the 0x17 come from (hardware scancode)? Where is the
> set of names that include 'prog1' defined? Is it evdev that does the
> remapping defined by HAL?
Hi,
I tried it with a different key name. Here's mine:
<append key="input.keymap.data" type="strlist">0x17:computer</append>
Check /usr/src/linux/include/linux/input.h
At line 281:
#define KEY_COMPUTER 157
At line 271:
#define KEY_PROG1 148
Line numbers taken from 2.6.27.6 vanilla sources + tpsmapi and thinkpad_acpi
patches.
Here is what I guess. It's probably not completly correct, but at least it works
on my system:
If you use "0x17:computer" then the hardware scancode 0x17 (defined in
thinkpad_acpi sources for ThinkVantage) will be mapped to the "kernel keycode"
"KEY_COMPUTER" (decimal 157). Apparently the mapping is neither case sensitive
nor does one need to specify the "KEY_" prefix.
evdev later transforms it to XF86MyComputer which can be used for usual key
bindings then.
I do not know where the mapping between "kernel keycode" and X keysyms is
defined, but /usr/share/X11/XKeysymDB is also worth a look I guess.
Best regards,
Jens