Implement scancode indexing

The mapping from scancodes to the indexes used in xrdp_keymap
is not well designed and contains an implicit dependency on
keycode values.

This mapping is alse slightly different from the index used for
the 'keys' map in the xrdp_wm structure.

This commit introduces support for mapping scancodes directly
to 'scancode indexes' suitable for indexing into both structures.

Some renaming is also done; [MS-RDPBCGR] uses the terms scancode
and keyCode interchangeably. An effort is made to use key_code for a
raw value from a TS_KEYBOARD_EVENT, and scancode for a value which is
produced by the scancode module.
This commit is contained in:
matt335672
2024-06-14 15:57:13 +01:00
parent d82a172b55
commit c91ef80ca9
11 changed files with 298 additions and 144 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ output_file_section(FILE *outf,
continue;
}
e.keycode = scancode_to_keycode(scancode);
e.keycode = scancode_to_x11_keycode(scancode);
nbytes = XLookupString(&e, text, 255, &ks, NULL);
if (ks == NoSymbol)
{