Skip to content

Commit

Permalink
Don't send key equivalents to the input hanlder (#20621)
Browse files Browse the repository at this point in the history
Release Notes:

- Fix `cmd-backtick` to change windows
  • Loading branch information
ConradIrwin authored Nov 13, 2024
1 parent a15f408 commit 3c2dcf5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/gpui/src/platform/mac/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 3c2dcf5

Please sign in to comment.