From 3f145f2e86ad7a6fc3ea7367b8812114ee2a66ae Mon Sep 17 00:00:00 2001 From: Heng-Yi Wu <2316687+henry40408@users.noreply.github.com> Date: Tue, 18 Oct 2022 20:52:39 +0800 Subject: [PATCH 1/2] fix(windows): responds to alt+space for window menu (#547) --- .changes/responds-to-alt-space.md | 5 +++++ src/platform_impl/windows/event_loop.rs | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changes/responds-to-alt-space.md diff --git a/.changes/responds-to-alt-space.md b/.changes/responds-to-alt-space.md new file mode 100644 index 000000000..bb4566607 --- /dev/null +++ b/.changes/responds-to-alt-space.md @@ -0,0 +1,5 @@ +--- +"tao": "patch" +--- + +On Windows, show window menu in response to Alt+Space. diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 64b3cfe68..28566c609 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -2073,6 +2073,11 @@ unsafe fn public_window_callback_inner( } } + win32wm::WM_SYSCHAR => { + // Handle system shortcut e.g. Alt+Space for window menu + result = ProcResult::DefWindowProc; + } + _ => { if msg == *DESTROY_MSG_ID { DestroyWindow(window); From 5115f2942e859f12e2616b6718a27e5f4365db35 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 18 Oct 2022 23:27:36 +0200 Subject: [PATCH 2/2] Update .changes/responds-to-alt-space.md --- .changes/responds-to-alt-space.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/responds-to-alt-space.md b/.changes/responds-to-alt-space.md index bb4566607..609f30fdd 100644 --- a/.changes/responds-to-alt-space.md +++ b/.changes/responds-to-alt-space.md @@ -2,4 +2,4 @@ "tao": "patch" --- -On Windows, show window menu in response to Alt+Space. +On Windows, show Window menu (also known as the System menu or Control menu) in response to Alt+Space.