Bug 17755

Summary: xserver-1.5.0 keep keyboard scancodes someone in memory
Product: xorg Reporter: Alexey Kuznetsov <axet>
Component: Input/KeyboardAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.4 (2008.09)   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alexey Kuznetsov 2008-09-24 09:06:19 UTC
Hi! Today i make small research and found a bug in 1.5.0.

I do not make code review, just make small analysis and found buggy state.

In my opininon xserver (or its component, xkb or other) on start read keyboard layout and keep some values in memory or local variables. After client fully loaded user unable to change some system key keycodes by xmodmap or by new leyboard layout with gnome-keyboard-properties utility.

In my experiment i choise 5 keys on my macbook keyboard, here is it:
# option
# mac left
# mac right
# enter
# eject

take a look to keyboard image:

http://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1220/Pasted%20Graphic.png


after it my plan is to change those keys to linux-like style, to:
# Windows Key
# alt left
# alt right
# del
# print screen


i can do it by 3 ways:
- by xmodmap
- by gnome-keyboard-properties
- by /etc/X11/xorg.conf

two first ways make a fault and only one last way make succefluly map.


To do first way by xmodmap i make simple config:
~/.xmodmap
keycode 64 = Super_L
keycode 115 = Alt_L
keycode 116 = Alt_R
keycode 108 = Delete
keycode 204 = Print 

and run it. As result i got an error:
* key sequince ctrl+super+backspace will kill Xserver
* key sequince ctrl+alt+backspace also kill it (normal state)
* key print screen do not affect screen capturing
* super key do not apply as super key and do not affect on windows move

for second way i do xkb config changes and add new keyboard layout.

when i done second way, i got less errors. here is:
* super button do not affect move window

and only when i done thrid way, put new keyboard layout in /etc/X11/xorg.conf, all going to normal.



in my opinion xserver keep some keycodes inside memory state, what prevent to override some system keys like printscreen, alt, suprer and prevent to change that setting on the fly.

there my experiment on russian language with more details, scan codes, screen shots and other:

http://blog.axet.ru/2008/09/keyboard-mapping-bug.html
Comment 1 Alexey Kuznetsov 2009-11-01 07:23:19 UTC

*** This bug has been marked as a duplicate of bug 22232 ***

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.