Problem of grabbing the first keystroke after input device keymap switch
Henry.Zhao at Sun.COM
Fri Feb 13 19:20:36 PST 2009
In a system with multiple input keyboard devices, keymap switch takes
place when server receives the first keystroke from a new device. Before
posting it updates the keymap of core device, and sends out
SendMappingNotify() (all done in SwitchsCoreKeyboard()).
However in my testing case, the client is unable to grab this first
although it can correctly grab subsequent strokes from the new device.
With "xmodmap -pk" I am sure the keymap switch takes place as expected.
After receiving mapping notify, the client does another round of grab based
on the new keymap, and at that point I can tell the keymap is already
correctly updated. But the client is still unable to grab the first
It does not seem to be a timing issue: I add some delay after
in SwitchsCoreKeyboard() to postpone posting, but this does not help.
Any thoughts ?
More information about the xorg