[patch] add keymap data to make random laptop vendor keys work

Richard Hughes hughsient at gmail.com
Thu May 3 16:32:05 PDT 2007


On Thu, 2007-05-03 at 23:58 +0100, Bastien Nocera wrote:
> On Thu, 2007-05-03 at 23:53 +0100, Richard Hughes wrote:
> > On Thu, 2007-05-03 at 23:40 +0100, Bastien Nocera wrote:
> <snip>
> > > Could we at least have the xml file pre-processed? I really don't
> want
> > > to have to clean up after somebody made a typo.
> > 
> > You could use that argument for *any* of data in the fdi files.
> There's
> > also not much processing done - the user gets the message in dmesg,
> and
> > then chooses the correct key, we check it and then commit it.
> 
> It's not nice having to check the keycode against something in a file
> each time. I'm sure someone could write a little script in Perl that
> would do that for us.

You mean at BUILD time? A few lines of sec could do that for us I think,
although it introduces another layer of obscurity in my opinion.

> <snip>
> > > Isn't it possible to avoid calling setkeycodes, and including the
> code
> > > directly in the addon?
> > 
> > Hmm. Perhaps. I didn't want to duplicate the code, but it may be
> sane in
> > this case. Do you know how many LOC this would be?
> 
> Look for setkeycodes.c in Google, it says about 50 lines. Makes a lot
> of sense to duplicate it :)

Agree. See attached (untested) patch.

> > > Finally, before everybody goes bananas at adding keys, there's a
> big fat
> > > warning in setkeycodes:
> > > BUGS
> > >        The keycodes of X have nothing to do with those of Linux.
> > > Unusual keys can be made visible under Linux, but not under X.
> > 
> > Sure, this assumes the keys are mapped. I don't see this as a big
> > problem.
> 
> Well, that means that it would kill the idea David had of having a
> graphical application to do it. 

Ohh, I see what you mean now, I thought you meant post-quirk to X. It's
going to have to be a "how to I turn the dmesg error into a working
button type faq I think".

Richard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-keymap-no-spawn.patch
Type: text/x-patch
Size: 8602 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070504/9808735f/hal-keymap-no-spawn.bin


More information about the hal mailing list