[Gta04-owner] X keycode of the Power/AUX buttons
Neil Jerram
neil at ossau.homelinux.net
Fri Nov 11 17:09:18 CET 2011
On 11.11.2011 15:16, Dr. H. Nikolaus Schaller wrote:
> I think I have pinned down the problem why the AUX button is
> recognized as a mouse.
>
> The evdev driver looks at the keycodes the driver can send. And
> counts the
> number of "Mouse buttons". It assumes that the highest code it finds
> defines
> the number of mouse buttons.
Nice, thanks.
> Now, our driver is configured in the boardfile to send a
>
> .code = BTN_EXTRA,
>
> I don't remember why... Maybe from copying some example code that was
> intended
> for a mouse.
>
> A better choice is to send KEY_OK (0x160).
>
> There was another issue with evdev (which I would consider a bug).
> evdev
> also looks for keys but only in keycode range 0 .. BTN_MISC-1
> (=0xff). So we
> need to add a dummy key in this range or evdev still does not
> recognize it as
> a keyboard.
>
> I still can't see an event printed by xev, although the xorg.log
> appears to
> be ok. Maybe the KEY_OK button is not mapped to anything by default.
I'm still not clear on whether and how there is a mapping from the
values like KEY_OK that are fed _into_the_bottom_ of evdev, and the
keycode values like <POWR> that come _out_of_the_top_ of evdev and feed
into X.
But whether it's mapped or not, in order to be usable at the X level, I
think the top keycode value needs to be one of those listed in the XKB
config as an evdev keycode, and which has an associated keysym.
I'll try to have a look at this this evening - unless you've already
sorted it all out by then :-)
Regards,
Neil
More information about the Gta04-owner
mailing list