[patch] add keymap data to make random laptop vendor keys work
Richard Hughes
hughsient at gmail.com
Mon Jun 4 09:56:11 PDT 2007
On Mon, 2007-06-04 at 18:13 +0200, Lennart Poettering wrote:
> 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.
Gotcha. Cheers for the explanation.
> > + <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.
Right.
> > + /* use gpref as it's really quick */
>
> s/gpref/gperf/
Oops.
> 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.
Yes, sounds a very good idea. My awk skillz are lacking - how do I strip
off the KEY_ prefix? And do we want this ideally lower case or upper
case?
> I will prepare .fdi files for the two laptop models I have lying
> around here shortly.
Good man, thanks. Latest patches attached.
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-keymap.patch
Type: text/x-patch
Size: 10356 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070604/3f15626b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-info-keymap.patch
Type: text/x-patch
Size: 2946 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070604/3f15626b/attachment-0001.bin
More information about the hal
mailing list