[PATCH v4 xserver] xkb: fix releasing overlay while keydown

Mihail Konev k.mvc at ya.ru
Sun Nov 6 22:52:09 UTC 2016


There is the log produced with debugging patch to illustrate
the logic in v4.
I'm not sure if doubled key events are guaranteed behaviour,
and not machine-specific one.


Tilde down
There the "`" is sent

[ 12894.309] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12894.309] (II) XkbProcessKeyboardEvent: brk
[ 12894.309] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12894.309] (II) XkbProcessKeyboardEvent: brk
...
[ 12896.268] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12896.268] (II) XkbProcessKeyboardEvent: brk

Insert down
Overlay becomes active

[ 12896.303] (II) XkbProcessKeyboardEvent: rel:0 ov_a:1 k_ov:0
[ 12896.303] (II) XkbProcessKeyboardEvent:165
[ 12896.303] (II) XkbProcessKeyboardEvent: rel:0 ov_a:1 k_ov:2
[ 12896.303] (II) XkbProcessKeyboardEvent:165
[ 12896.338] (II) XkbProcessKeyboardEvent: rel:0 ov_a:1 k_ov:2
[ 12896.338] (II) XkbProcessKeyboardEvent:165
...
[ 12900.265] (II) XkbProcessKeyboardEvent: rel:0 ov_a:1 k_ov:2
[ 12900.265] (II) XkbProcessKeyboardEvent:165

Insert up
Overlay becomes inactive
Now ignoring Tilde keypresses

[ 12900.300] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:2
[ 12900.300] (II) XkbProcessKeyboardEvent: ign
[ 12900.300] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:2
[ 12900.300] (II) XkbProcessKeyboardEvent: ign
[ 12900.334] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:2
...
[ 12902.455] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:2
[ 12902.455] (II) XkbProcessKeyboardEvent: ign

Tilde up
Treat it as overlaid-tilde-keyrelease

[ 12902.486] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:2
[ 12902.486] (II) XkbProcessKeyboardEvent:165
[ 12902.486] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:1
[ 12902.486] (II) XkbProcessKeyboardEvent:165

Tilde down
Then "ign"-s before were (and "brk"-s here are)
for "`" to be sent now.

[ 12907.136] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12907.136] (II) XkbProcessKeyboardEvent: brk
[ 12907.136] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12907.136] (II) XkbProcessKeyboardEvent: brk

Tilde up
Without "ign"-s before, only this would recover Tilde from overlay.

[ 12907.298] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:0
[ 12907.298] (II) XkbProcessKeyboardEvent: brk
[ 12907.298] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:0
[ 12907.298] (II) XkbProcessKeyboardEvent: brk

Tilde down
There and afterwards the "`"-s are sent regardless of (key_was_overlaid - 1) or just 0

[ 12914.156] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12914.156] (II) XkbProcessKeyboardEvent: brk
[ 12914.156] (II) XkbProcessKeyboardEvent: rel:0 ov_a:0 k_ov:0
[ 12914.156] (II) XkbProcessKeyboardEvent: brk

Tilde up

[ 12914.278] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:0
[ 12914.278] (II) XkbProcessKeyboardEvent: brk
[ 12914.278] (II) XkbProcessKeyboardEvent: rel:1 ov_a:0 k_ov:0
[ 12914.278] (II) XkbProcessKeyboardEvent: brk


More information about the xorg-devel mailing list