From f5164e8ff730758660ba1a52d7411692dd8463c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?okhowang=28=E7=8E=8B=E6=B2=9B=E6=96=87=29?= Date: Mon, 16 Mar 2020 23:08:39 +0800 Subject: [PATCH] workaround odd shift behaviour --- xrdp/xrdp_wm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 1f44f639..90b7ce15 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1532,6 +1532,12 @@ xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code) return 0; } + // workaround odd shift behavior + // see https://github.com/neutrinolabs/xrdp/issues/397 + if (scan_code == 42 && device_flags == (KBD_FLAG_UP | KBD_FLAG_EXT)) { + return 0; + } + if (device_flags & KBD_FLAG_UP) /* 0x8000 */ { self->keys[scan_code] = 0;