Bug 12167 - virtual keys missing from evdev keycodes, breaks modifiers
Summary: virtual keys missing from evdev keycodes, breaks modifiers
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: doc (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-26 09:48 UTC by Mohammed Adnène Trojette
Modified: 2007-08-27 14:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fake keycodes for virtual keys (603 bytes, patch)
2007-08-26 09:49 UTC, Mohammed Adnène Trojette
Details | Splinter Review

Description Mohammed Adnène Trojette 2007-08-26 09:48:14 UTC
The following bug was filed in the Debian BTS:

Upon switching from kbd to evdev driver, and thus from xorg to evdev
keycode mappings, my window manager bindings stopped working. I
eventually traced this down to a weird part of the keycode files. 
In keycodes/xfree86, there are mappings for seven keys including <META>
to codes that never occur. I added similar lines to evdev:
        // Fake keycodes for virtual keys
	<MDSW> =   241; 
	<LVL3> =   242; 
	<ALT>  =   243;
	<META> =   244; 
	<SUPR> =   245; 
	<HYPR> =   246; 
And now my bindings do work. In linux/input.h keycode 240 is called
unknown and the range 241-255 are not defined. 

xmodmap output with this change:
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_L (0xf3),  Meta_L (0xf4)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0xf5),  Hyper_L (0xf6)
mod5        ISO_Level3_Shift (0x6c),  Mode_switch (0xf1),
ISO_Level3_Shift (0xf2)

xmodmap output witout it:
xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40)
mod2        Num_Lock (0x4d)
mod3      
mod4      
mod5        ISO_Level3_Shift (0x6c)

The left logo key is mapped to Super_L and mod4, but without the fake
keys that fails somehow.
Comment 1 Mohammed Adnène Trojette 2007-08-26 09:49:30 UTC
Created attachment 11279 [details] [review]
Fake keycodes for virtual keys
Comment 2 Sergey V. Udaltsov 2007-08-27 14:11:47 UTC
Thanks, committed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.