[patch] Add keymap remapping to HAL

Richard Hughes hughsient at gmail.com
Thu Jun 7 14:46:47 PDT 2007


On Thu, 2007-06-07 at 17:35 -0400, David Zeuthen wrote:
> On Thu, 2007-06-07 at 21:28 +0100, Richard Hughes wrote:
> > In my initial testing I was using scancodes less that 127, and thus didn't
> > pick up on this problem. The conversion code is the same as used in setkeycodes.
> > 
> > Comments? Okay to commit?
> 
> I'm a bit baffled why you put in e017 in the first place; that's what
> you got out of dmesg?

Yup.

> > With the attached patch the keys work, and I get:
> > 
> > hal-setup-keymap: parsed e016:wlan to (e016, 238)
> > hal-setup-keymap: parsed e017:sleep to (e017, 142)
> > hal-setup-keymap: parsed e018:suspend to (e018, 205)
> 
> Should probably read something like
> 
>  hal-setup-keymap: parsed e018:suspend to (98, 205)
> 
> then. Also, suggest to prefix the debug output with 0x so it's evident
> we're talking about hexadecimal, e.g. it would be
> 
>  hal-setup-keymap: parsed e018:suspend to (0x98, 0x205)

Well, the first I agree, but the second is decimal IIRC. Something like
(0x98, 205) is probably best.

> An alternative to the whole remapping thing is just to do the remapping
> in hand, e.g. instead of having 
> 
>  <append key="input.keymap.data" type="strlist">e018:suspend</append> <!-- Fn+F12 hibernate -->
> 
> you'd have
> 
>  <append key="input.keymap.data" type="strlist">98:suspend</append> <!-- Fn+F12 hibernate -->
> 
> but I bet that defeats the purpose of making it easy for users to
> generate these fdi files themselves.

Totally.

> Which is a pretty important feature
> I'd say - so I'm fine with doing the remapping in the tool; OK to commit
> if you also apply the changes to the debug output I rambled about above.

Brilliant, thanks.

Richard.




More information about the hal mailing list