Skip to content

Commit 9471a4a

Browse files
committed
Merge pull request #108659 from jdavasligil/x11-unicode-keysym-fix
Add keypad codes to the keysym unicode map.
2 parents 2bfc321 + 93cd0a1 commit 9471a4a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

platform/linuxbsd/x11/key_mapping_x11.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,28 @@ void KeyMappingX11::initialize() {
11141114
xkeysym_unicode_map[0x13BE] = 0x0178;
11151115
xkeysym_unicode_map[0x20AC] = 0x20AC;
11161116

1117+
// Support keypad keycodes such as `XK_KP_Equal`.
1118+
// Values can be found in `X11/keysymdef.h` on line 278.
1119+
xkeysym_unicode_map[0xFF80] = 0x0020;
1120+
xkeysym_unicode_map[0xFF89] = 0x0009;
1121+
xkeysym_unicode_map[0xFFBD] = 0x003D;
1122+
xkeysym_unicode_map[0xFFAA] = 0x002A;
1123+
xkeysym_unicode_map[0xFFAB] = 0x002B;
1124+
xkeysym_unicode_map[0xFFAC] = 0x002C;
1125+
xkeysym_unicode_map[0xFFAD] = 0x002D;
1126+
xkeysym_unicode_map[0xFFAE] = 0x002E;
1127+
xkeysym_unicode_map[0xFFAF] = 0x002F;
1128+
xkeysym_unicode_map[0xFFB0] = 0x0030;
1129+
xkeysym_unicode_map[0xFFB1] = 0x0031;
1130+
xkeysym_unicode_map[0xFFB2] = 0x0032;
1131+
xkeysym_unicode_map[0xFFB3] = 0x0033;
1132+
xkeysym_unicode_map[0xFFB4] = 0x0034;
1133+
xkeysym_unicode_map[0xFFB5] = 0x0035;
1134+
xkeysym_unicode_map[0xFFB6] = 0x0036;
1135+
xkeysym_unicode_map[0xFFB7] = 0x0037;
1136+
xkeysym_unicode_map[0xFFB8] = 0x0038;
1137+
xkeysym_unicode_map[0xFFB9] = 0x0039;
1138+
11171139
// Scancode to physical location map.
11181140
// Ctrl.
11191141
location_map[0x25] = KeyLocation::LEFT;

0 commit comments

Comments
 (0)