Invalid keynames are reported for some keys with CTRL
On some systems - apparently depending on language and/or keyboard layout, some keypresses report invalid keynames. One of our users reported the problem with english (US) keyboard layout.
I have attached a simple test program, compile and run, then (with an english/US keyboard layout) press the following keys:
CTRL (press and hold), then the "[", "]" and "\" keys (the three keys on the right in the row above "enter").
The expected output (on a system that is not affected by the bug) looks like this:
keyval: ffe3 keyname: Control_L keyval from name: ffe3 scancode: 001d hw-keycode: 0011
keyval: 005b keyname: bracketleft keyval from name: 005b scancode: 001a hw-keycode: 00db
keyval: 005d keyname: bracketright keyval from name: 005d scancode: 001b hw-keycode: 00dd
keyval: 005c keyname: backslash keyval from name: 005c scancode: 002b hw-keycode: 00dc
But on a system that is affected by the bug, we instead get this:
keyval: ffe3 keyname: Control_L keyval from name: ffe3 scancode: 001d hw-keycode: 0011
keyval: 100001b keyname: U+001B keyval from name: ffffff scancode: 001a hw-keycode: 00db
keyval: 100001d keyname: U+001D keyval from name: ffffff scancode: 001b hw-keycode: 00dd
keyval: 100001c keyname: U+001C keyval from name: ffffff scancode: 002b hw-keycode: 00dc
Fortunately i could reproduce the problem on my windows10 setup, so if you need further info just ask :). My guess is that it occurs when the first installed language and keyboard layout is NOT english (in my case it is german), and then another language/layout is installed after that.
This is with msys2 on windows10, gtk 3.24.31+56+g7e9935e3-1
#4665 (closed) looks like it could be a closely related issue