Bug 23622

Summary: Keyboard events not firing when multiple keys depressed
Product: xorg Reporter: Bob Ball <freedesktop>
Component: Input/KeyboardAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED NOTOURBUG QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: low CC: peter.hutterer
Version: 7.4 (2008.09)   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Bob Ball 2009-09-01 03:20:10 UTC
Some keyboard events do not fire (but others do fire) when certain key combinations are depressed.

Reproduction details:
* Disable key repeat
* run up xev
* Hold down up and left
* Try all keys and record which keys are recognised and which are not.

On one machine (SuSE 10.2, KDE) the keys ghbn are not recognised as key press events, but the rest are.
On another (SuSE 10.2, Gnome): ghbn not recognised
A third (Ubuntu 9.04, Gnome): df not recognised (plus a couple of others, but I'm not totally sure which keys they are!)

This curiously doesn't cause any problems when up and right are held together!

If you release left (or up) while pressing g, the g is then registered.

To give a little background as to why anyone would want to do this, the bug was identified using a simple Java game in which one player uses the arrow keys to move forward and turn, and a second player uses WASD.  I was trying to prove whether the bug was in java, my code or somewhere else when I tested using xev.
Comment 1 Bob Ball 2009-09-01 15:03:57 UTC
Just to comment that on the 3rd machine, the keys sdghzvbm do not get recognised when up+left are depressed.  First two machines are desktops, third machine is a laptop.

A 4th machine (Ubuntu 9.04/gnome/laptop) also skips ghbn
Comment 2 Peter Hutterer 2009-09-01 21:31:38 UTC
Please make sure that the issue isn't hardware-related. 

Download http://people.freedesktop.org/~whot/evtest.c, compile it with gcc -o
evtest evtest.c and then run it as root against the device file.
The device file is /dev/input/eventX, where X is a number. You can get the
right device file by looking into /proc/bus/input/devices. 

Hitting a key will print out the event. Hit the non-working keys simultaneously and check the log - are events still being sent?

Comment 3 Bob Ball 2009-09-02 14:32:40 UTC
Event: time 1251926981.707247, -------------- Report Sync ------------
Event: time 1251926983.775057, type 4 (Misc), code 4 (ScanCode), value c8
Event: time 1251926983.775090, type 1 (Key), code 103 (Up), value 1
Event: time 1251926983.775099, -------------- Report Sync ------------
^[[AEvent: time 1251926983.979909, type 4 (Misc), code 4 (ScanCode), value cb
Event: time 1251926983.979925, type 1 (Key), code 105 (Left), value 1
Event: time 1251926983.979931, -------------- Report Sync ------------
^[[DEvent: time 1251926984.217093, type 4 (Misc), code 4 (ScanCode), value cb
Event: time 1251926984.217110, type 1 (Key), code 105 (Left), value 2
Event: time 1251926984.282317, -------------- Report Sync ------------
Event: time 1251926984.304788, type 4 (Misc), code 4 (ScanCode), value 1e
Event: time 1251926984.304800, type 1 (Key), code 30 (A), value 1
Event: time 1251926984.304803, -------------- Report Sync ------------
aEvent: time 1251926984.467881, type 4 (Misc), code 4 (ScanCode), value 1e
Event: time 1251926984.467895, type 1 (Key), code 30 (A), value 0
Event: time 1251926984.467900, -------------- Report Sync ------------

There are no recorded events for G or H

I'm guessing this means it's a kernel bug?

It happens on four different keyboards so I'd guess it's more likely to be kernel rather than actual hardware.

Comment 4 Peter Hutterer 2009-09-02 15:21:42 UTC
I'd say it's the hardware. 

"Some low-quality keyboards suffer problems with rollover (that is, when multiple keys are pressed in quick succession); some types of keyboard circuitry will register a maximum number of keys at one time."
http://en.wikipedia.org/wiki/Keyboard_%28computing%29
see also: http://en.wikipedia.org/wiki/Rollover_%28key%29

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.