Skip to content

Commit

Permalink
Pass "menu" key presses in windows down as a Keystroke (#25000)
Browse files Browse the repository at this point in the history
This is second part needed for #17819.
There is already binding in default bindings: `"menu":
"editor::OpenContextMenu",` (but won't work on windows without this
change)

Release Notes:

- Handle "menu" key in windows
  • Loading branch information
gim913 authored Feb 21, 2025
1 parent ad4163b commit 3c4903c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/gpui/src/platform/windows/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ fn parse_syskeydown_msg_keystroke(wparam: WPARAM) -> Option<Keystroke> {
VK_ESCAPE => "escape",
VK_INSERT => "insert",
VK_DELETE => "delete",
VK_APPS => "menu",
_ => {
let basic_key = basic_vkcode_to_string(vk_code, modifiers);
if basic_key.is_some() {
Expand Down Expand Up @@ -1303,6 +1304,7 @@ fn parse_keydown_msg_keystroke(wparam: WPARAM) -> Option<KeystrokeOrModifier> {
VK_ESCAPE => "escape",
VK_INSERT => "insert",
VK_DELETE => "delete",
VK_APPS => "menu",
_ => {
if is_modifier(VIRTUAL_KEY(vk_code)) {
return Some(KeystrokeOrModifier::Modifier(modifiers));
Expand Down

0 comments on commit 3c4903c

Please sign in to comment.