diff --git a/dlls/win32u/menu.c b/dlls/win32u/menu.c index f232585940d..84556b95afa 100644 --- a/dlls/win32u/menu.c +++ b/dlls/win32u/menu.c @@ -4242,10 +4242,6 @@ static BOOL track_menu( HMENU hmenu, UINT flags, int x, int y, HWND hwnd, const menu_right_key( &mt, flags, msg.message ); break; - case VK_ESCAPE: - exit_menu = menu_key_escape( &mt, flags ); - break; - case VK_F1: { HELPINFO hi; @@ -4262,8 +4258,9 @@ static BOOL track_menu( HMENU hmenu, UINT flags, int x, int y, HWND hwnd, const break; } + case VK_ESCAPE: default: - NtUserTranslateMessage( &msg, 0 ); + exit_menu = menu_key_escape( &mt, flags ); break; } break; /* WM_KEYDOWN */ diff --git a/dlls/winewayland.drv/wayland_keyboard.c b/dlls/winewayland.drv/wayland_keyboard.c index 8f7b6dce30f..9b382204f0b 100644 --- a/dlls/winewayland.drv/wayland_keyboard.c +++ b/dlls/winewayland.drv/wayland_keyboard.c @@ -629,8 +629,8 @@ static void release_all_keys(HWND hwnd) { /* Skip mouse buttons. */ if (vkey < 7 && vkey != VK_CANCEL) continue; - /* Skip left/right-agnostic modifier vkeys. */ - if (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU) continue; + /* Skip modifier vkeys. */ + if (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU || (vkey >= VK_LSHIFT && vkey <= VK_RMENU)) continue; if (state[vkey] & 0x80) { diff --git a/server/queue.c b/server/queue.c index 18b08f1480b..888286c2a8c 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2433,11 +2433,10 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c } } - if (origin == IMO_HARDWARE) + if ((origin == IMO_HARDWARE) && (input->kbd.scan == desktop->key_repeat.input.kbd.scan)) { /* if the repeat key is released, stop auto-repeating */ - if (((input->kbd.flags & KEYEVENTF_KEYUP) && - (input->kbd.scan == desktop->key_repeat.input.kbd.scan))) + if (input->kbd.flags & KEYEVENTF_KEYUP) { stop_key_repeat( desktop ); }