From d22aeb201583a59f8ed2c33e7d3234810e50a5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand?= Date: Tue, 11 Nov 2003 14:01:31 +0000 Subject: [PATCH] Resetting Windows key state in reset_modifiers git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@547 423420c4-83ab-492f-b58f-81f9feb106b5 --- xkeymap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xkeymap.c b/xkeymap.c index e4c2029..ba25e22 100644 --- a/xkeymap.c +++ b/xkeymap.c @@ -276,6 +276,17 @@ send_winkey(uint32 ev_time, BOOL pressed, BOOL leftkey) } } +static void +reset_winkey(uint32 ev_time) +{ + if (g_use_rdp5) + { + /* For some reason, it seems to suffice to release + *either* the left or right winkey. */ + rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LWIN); + } +} + /* Handles, for example, multi-scancode keypresses (which is not possible via keymap-files) */ BOOL @@ -600,6 +611,8 @@ reset_modifier_keys() !get_key_state(state, XK_Alt_R) && !get_key_state(state, XK_Mode_switch)) rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RALT); + reset_winkey(ev_time); + rdp_send_input(ev_time, RDP_INPUT_SYNCHRONIZE, 0, ui_get_numlock_state(state), 0); }