Can't map keys with keycodes > 127 to modifiers?
Marius Gedminas
mgedmin at b4net.lt
Wed Sep 12 03:07:57 PDT 2007
My Thinkpad T61 has a few keys that act strangely in X: Menu, Workspace
Prev, Workspace Next. By "acting strangely" I mean:
1. xset -r disables autorepeat for all the keys on the keyboard except
for these three (and Fn).
2. 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.
showkey -s on the console shows that these keys send the following scan
codes:
menu sends 0xe0 0x63 (on a normal keyboard it sends 0xe0 0x5d)
prev-document sends 0xe0 0x6a
next-document sends 0xe0 0x69
Another fun fact I just noticed: if I hold down Fn, it also sends a flurry of
repeating keycode 227 keypress/release events, and showkey -s shows the same
0xe0 0x63 scan code.
Marius Gedminas
--
Any sufficiently advanced Operating System is indistinguishable from Linux.
-- Jim Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20070912/9a51bbcf/attachment.pgp>
More information about the xorg
mailing list