Don't set keymap if already set

Richard Hughes hughsient at gmail.com
Fri Jun 8 05:14:30 PDT 2007


On Fri, 2007-06-08 at 13:18 +0200, Lennart Poettering wrote:
> On Fri, 08.06.07 12:07, Richard Hughes (hughsient at gmail.com) wrote:
> 
> > Henrique (thinkpad_acpi maintainer) wanted to make sure we were not
> > setting scancode->keycode mappings for keys that had already been
> > assigned. We could assign the keys in the kernel driver using dmi
> > mapping or in userspace by already using setkeycodes in hotkey-setup.
> > 
> > The attached (untested) patch fixes this, but also has the side effect
> > of not letting the use change the fdi file mappings while testing
> > without rebooting or reloading the thinkpad_acpi module.
> > 
> > Good thing / bad thing? Patch attached for comments.
> 
> Really bad thing!
> 
> Please don't do this!

Sure, hence asking for comments :-)

> I have two laptops here, from two different vendors (FIC, MSI), and
> both have a few keys that are mapped to wrong keycodes by default by
> the Linux kernel. If you disallow overwriting these mappings the whole
> HAL keymapping thing becomes unsuable for these laptops. And I am sure
> that my two laptops here are not the only ones which suffer by this
> problem!

Ahh, gotcha.

> Also, I don't see why Henrique wants to see this feature in the first
> place? Is he afraid that HAL would break already properly set up
> keycodes? If so this would probably be a bug in an .fdi file -- and
> should be fixed there.

Sure. Or support not compiled in if you really don't want the feature.

Thanks for your quick reply.

Richard.




More information about the hal mailing list