Why does X11 generate an extra SHIFT when I press Shift+KP_1 ?

Ilya Anfimov ilan at tzirechnoy.com
Mon Feb 17 17:08:02 UTC 2020


On Mon, Feb 17, 2020 at 08:34:47PM +0530, Sreyan Chakravarty wrote:
>    I did post the unfiltered output but it got scrubbed.
>    This is my unfiltered output:
>    IT SEEMS THE MOMENT I PRESS KP_1 WITH SHIFT A RELEASE EVENT IS GENERATED
>    FOR MY SHIFT KEY EVEN BEFORE THE KEY PRESS FOR KP_1 IS REGISTERED AND WHEN
>    I RELEASE KP_1 A PRESS EVENT IS GENERATED.
>    IT IS ALMOST AS IF MY XKB CONFIGURATION FORBIDS SHIFT+KP_1 NO MATTER WHAT
>    I DO.

 Well, it is possible. However, there are may be other explanations:
  -- some strange intellectual behaviour of the hardware (keyboard itself).
  -- some keyboard switching applet, that uses XTest to do that.


 At least this have some logic! It somehow blocks Shift+KP1 by releasing
Shift before sending KP1.

 Next simple thing: could you provide xkb dump?

 xkbcomp "$DISPLAY" /tmp/dump.xkb

>    KeyPress event, serial 30, synthetic NO, window 0x4e00001,
>        root 0x3ac, subw 0x0, time 753837, (164,561), root:(814,600),
>        state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>        XLookupString gives 0 bytes:
>        XFilterEvent returns: False
> 
>    KeyRelease event, serial 30, synthetic NO, window 0x4e00001,
>        root 0x3ac, subw 0x0, time 754303, (164,561), root:(814,600),
>        state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>        XLookupString gives 0 bytes:
>        XFilterEvent returns: False
> 
>    KeyPress event, serial 30, synthetic NO, window 0x4e00001,
>        root 0x3ac, subw 0x0, time 754305, (164,561), root:(814,600),
>        state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
>        XLookupString gives 1 bytes: (31) "1"
>        XFilterEvent returns: False
> 
>    KeyRelease event, serial 30, synthetic NO, window 0x4e00001,
>        root 0x3ac, subw 0x0, time 754351, (164,561), root:(814,600),
>        state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
>        XLookupString gives 1 bytes: (31) "1"
>        XFilterEvent returns: False
> 
>    KeyPress event, serial 30, synthetic NO, window 0x4e00001,
>        root 0x3ac, subw 0x0, time 754352, (164,561), root:(814,600),
>        state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>        XLookupString gives 0 bytes:
>        XFilterEvent returns: False

[skipped]



More information about the xorg mailing list