gdkkeys-win32: Ignore CTRL bit for key translation

Some keymaps on Windows contain bogus mappings for Ctrl+key for certain
keys, e.g. Ctrl+Backspace = Delete, or Ctrl+[ = 0x1B. These are never
used on Windows, so we should ignore them.

Fixes #4667
This commit is contained in:
Philip Zander 2022-01-29 22:36:40 +01:00 committed by Luca Bacci
parent d033a099ae
commit 90ab8b8dd3
No known key found for this signature in database
GPG Key ID: 8E3C8D989C98883D

View File

@ -340,6 +340,13 @@ vk_to_char_fuzzy (GdkWin32KeymapLayoutInfo *info,
if (candidate_modbits & ~mod_bits)
continue;
/* Some keys have bogus mappings for the control key, e.g.
* Ctrl + Backspace = Delete, or Ctrl + [ = 0x1B. These are
* never used on Windows, so we ignore them.
*/
if (candidate_modbits == KBDCTRL)
continue;
c = entry->wch[level];
if (c == WCH_DEAD || have_sgcaps)
{