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

Bastien Nocera hadess at hadess.net
Thu May 3 15:40:08 PDT 2007


Hey Richard,

On Thu, 2007-05-03 at 18:45 +0100, Richard Hughes wrote:
> Attached are two patches that make the hibernate and suspend keys work
> on my Lenovo laptop. For other vendors, we just need to drop a new fdi
> file into hal-info (like we do for other quirks) and the buttons should
> just start working.
> 
> I've purposely not included the input.h constants (sorry Paul) as I
> couldn't justify doing over 900 strcmp's at startup just for developers
> when so many of us are trying to make hal start up in super quick time.

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.

> Other rationale? If we whitelist the quirks for each vendor and model
> quite specifically (like we do with video resume data) so that we don't
> accidentally break something that's already working then we won't have
> to change the constants. Zero pain.

Still pain of the typo...

> If this idea is approved by DavidZ, then I intend on writing a wiki page
> on "How to get rid of the dmesg setkeycodes warning" describing the
> steps to add an entry in hal-info. The other clear (i.e. specific)
> entries from hotkeys-setup we can add later when all the initial patches
> are agreed on.
> 
> Please review carefully. Comments and criticisms please.

Isn't it possible to avoid calling setkeycodes, and including the code
directly in the addon?

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.

Cheers

-- 
Bastien Nocera <hadess at hadess.net> 



More information about the hal mailing list