From 01ff2f4a27aa4534b0c4868bd65f889ef1ebf653 Mon Sep 17 00:00:00 2001 From: yuri_k7 Date: Sat, 3 Aug 2024 21:52:41 +0200 Subject: [PATCH 1/3] win32u: Exit menu key by default --- dlls/win32u/menu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 */ From 4c68b232fb74adbee9dcdcfc071b164f1abca1fb Mon Sep 17 00:00:00 2001 From: yuri_k7 Date: Sat, 3 Aug 2024 22:01:28 +0200 Subject: [PATCH 2/3] server: Fix repeated key for no reason --- server/queue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ); } From 4703ec176f8be19ee17c7433a8bd48a584dc5e63 Mon Sep 17 00:00:00 2001 From: yuri_k7 Date: Sat, 3 Aug 2024 22:21:31 +0200 Subject: [PATCH 3/3] winewayland.drv: Fix release_all_keys modifier filtering --- dlls/winewayland.drv/wayland_keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {