Merge pull request #3113 from matt335672/fix_evdev_keycode_problems

Fix evdev keycode problems
This commit is contained in:
matt335672 2024-06-14 10:23:29 +01:00 committed by GitHub
commit 8ee4a6cb6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View File

@ -476,6 +476,7 @@
/* TODO: to be renamed */
#define KBD_FLAG_RIGHT 0x0001
#define KBD_FLAG_EXT 0x0100 /* KBDFLAGS_EXTENDED */
#define KBD_FLAG_EXT1 0x0200 /* KBDFLAGS_EXTENDED1 */
#define KBD_FLAG_QUIET 0x1000
#define KBD_FLAG_DOWN 0x4000
#define KBD_FLAG_UP 0x8000

View File

@ -184,6 +184,11 @@ xrdp_fastpath_process_EVENT_SCANCODE(struct xrdp_fastpath *self,
flags |= KBD_FLAG_EXT;
}
if ((eventFlags & FASTPATH_INPUT_KBDFLAGS_EXTENDED1))
{
flags |= KBD_FLAG_EXT1;
}
xrdp_fastpath_session_callback(self, RDP_INPUT_SCANCODE,
code, 0, flags, 0);

View File

@ -311,7 +311,15 @@ lib_mod_event(struct mod *mod, int msg, tbus param1, tbus param2,
/* xup doesn't need the Unicode character mapping in param1. Send
* the X11 scancode instead, so xorgxrdp doesn't have to do this
* work again */
param1 = scancode_to_keycode(param3);
if ((param4 & KBD_FLAG_EXT) != 0)
{
// Extended key - set bit 9 of the scancode for the lookup
param1 = scancode_to_keycode(param3 | 0x100);
}
else
{
param1 = scancode_to_keycode(param3);
}
}
init_stream(s, 8192);