From 3c2dcf50faed3f89542af9c309af23b0a2cf44a5 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 13 Nov 2024 13:42:31 -0700 Subject: [PATCH] Don't send key equivalents to the input hanlder (#20621) Release Notes: - Fix `cmd-backtick` to change windows --- crates/gpui/src/platform/mac/window.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rs index e9c3f0a6bd0b3b..e5a04191a33a9e 100644 --- a/crates/gpui/src/platform/mac/window.rs +++ b/crates/gpui/src/platform/mac/window.rs @@ -1298,6 +1298,12 @@ extern "C" fn handle_key_event(this: &Object, native_event: id, key_equivalent: } } + // Don't send key equivalents to the input handler, + // or macOS shortcuts like cmd-` will stop working. + if key_equivalent { + return NO; + } + unsafe { let input_context: id = msg_send![this, inputContext]; msg_send![input_context, handleEvent: native_event]