Keyboard events and console switching

Helge Bahmann helge.bahmann at secunet.com
Thu Jan 22 07:55:08 PST 2009


When a key is in the "pressed" state while switching console, repeated 
KeyPress/KeyRelease events will be generated while switched away from the 
server. If switching was caused by Alt-Ctrl-Fx, then at least the Fx key is 
pressed and the focused application receives a continuous stream 
of "XF86_Switch_VT_x" events -- this in itself is sufficiently annoying 
already as various applications like to spew the logs when they encounter 
this event and don't know how to handle it.

Things get even more unfriendly if console switching is initiated by chvt from 
a background service (don't ask). I propose to change the current logic for 
releasing keys on VT switch -- release them before switching away from the 
server, instead of after switching back. Would a patch like the attached one 
be acceptable?

Best regards
-- 
Dipl. Math.
Helge Bahmann
Berater
Geschäftsbereich Hochsicherheit
secunet Security Networks AG
Ammonstraße 74
01067 Dresden, Germany
Fon: +49 201 54 54-3586
Fax: +49 201 54 54-1323
Email: helge.bahmann at secunet.com

Sitz: Kronprinzenstraße 30, 45128 Essen
Amtsgericht Essen HRB 13615
Vorstand: Dr. Rainer Baumgart, Thomas Koelzer, Thomas Pleines
Aufsichtsratsvorsitzender: Dr. Karsten Ottenberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xorg-vtswitch-release-keys.patch
Type: text/x-diff
Size: 4264 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090122/ec2931ea/attachment.patch>


More information about the xorg mailing list