[patch] add keymap data to make random laptop vendor keys work
Lennart Poettering
mzuny at 0pointer.de
Mon Jun 4 09:13:58 PDT 2007
On Mon, 04.06.07 16:52, Richard Hughes (hughsient at gmail.com) wrote:
> > > + kb.keycode = keycode;
> > > + kb.scancode = scancode;
> >
> > Uh!
> >
> > You have to pass an int[2] here, not a struct kbkeycode.
>
> I'll take your word for this, as the original setkeycode used
> kbkeycode.
setkeycode uses the console ioctls (KDSETKEYCODE). However, you're now using
the input subsystem ioctls. The former uses kbkeycode, the latter uses
int[2]. That's all.
> + <entry>
> + <literal>input.keymap.data.linux</literal> (strlist)
> + </entry>
> + <entry>e.g. "e017:142"</entry>
> + <entry>No</entry>
> + <entry>
> + The scancode to Linux input keycode constant.
> + The scancode is represented in hex, and the keycode in decimal.
> + You can append as many <literal>input.keymap.data.linux</literal>
> + values as there are keys to remap.
> + </entry>
Needs an update.
> + /* use gpref as it's really quick */
s/gpref/gperf/
One last thing: to make this truely portable you might want to drop
the ".linux" suffix from "input.keymap.data.linux", and also drop the
KEY_ prefix from the keycode names. (yeah, keyfuzz had those in the
keycode names, but keyfuzz wasn't about portability, while HAL is.)
With these two minor changes the FreeBSD/Solaris people can just add
their own addon for parsing this data and can make use of the
collected data as well.
I will prepare .fdi files for the two laptop models I have lying
around here shortly.
Thanks,
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the hal
mailing list