Binding keys with keycodes > 127 to XKB modifiers doesn't work
Submitted by Marius Gedminas
Assigned to Xorg Project Team
Description
My Thinkpad T61 has a few keys that act strangely in X: Menu, Workspace Prev, Workspace Next. By "acting strangely" I mean:
-
xset -r disables autorepeat for all the keys on the keyboard except for these three (and Fn).
-
It appears to be impossible to map these keys to modifiers (neither with xmodmap, nor with custom xkb symbols files)
The Menu key sends keycode 227 (instead of the usual 117 I get from the Menu key on a USB keyboard). I'm trying to map it to a ISO_Level3_Shift with
xmodmap -e 'keycode 227 = ISO_Level3_Shift' -e 'add mod5 = ISO_Level3_Shift'
and xev shows me the keysym correctly, but the state remains 0x0. Why?
I had the same problem mapping keycode 234 to Alt, and I went as far as to compile a custom XKB description so that xkbcomp :0 - showed me identical configurations for it and the real Alt key.
I can map these extra keys to, e.g., Multi_key, but not to any of the modifiers.
The Menu key on a USB keyboard, the one that sends keycode 117, is also mapped to ISO_Level3_Shift. It autorepeats, but despite that the state bit flips to 0x80 while I hold it down. xmodmap shows both 0xe3 (227) and 0x75 (117) among the keys mapped to mod5.
The only difference I can think of is that one keycode is < 128, while the other one needs full 8 bits. Just a blind guess, but could the XKB code be using signed chars somewhere and sign-extending them to ints?
This is with xserver 1.3.0 (Ubuntu's xorg-server 2:1.3.0.0.dfsg-12ubuntu3). I've had the problem with older versions as well.