Skip to content

Commit

Permalink
core: add context menu key
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollie committed Feb 4, 2025
1 parent f0d2760 commit 4a8ff61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/ghostty.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ typedef enum {
GHOSTTY_KEY_F23,
GHOSTTY_KEY_F24,
GHOSTTY_KEY_F25,
GHOSTTY_KEY_CONTEXT_MENU,

// keypad
GHOSTTY_KEY_KP_0,
Expand Down
2 changes: 2 additions & 0 deletions src/input/key.zig
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ pub const Key = enum(c_int) {
f23,
f24,
f25,
context_menu,

// keypad
kp_0,
Expand Down Expand Up @@ -567,6 +568,7 @@ pub const Key = enum(c_int) {
.backspace => cimgui.c.ImGuiKey_Backspace,
.print_screen => cimgui.c.ImGuiKey_PrintScreen,
.pause => cimgui.c.ImGuiKey_Pause,
.context_menu => cimgui.c.ImGuiKey_Menu,

.f1 => cimgui.c.ImGuiKey_F1,
.f2 => cimgui.c.ImGuiKey_F2,
Expand Down
1 change: 1 addition & 0 deletions src/input/keycodes.zig
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const code_to_key = code_to_key: {
.{ "ShiftRight", .right_shift },
.{ "AltRight", .right_alt },
.{ "MetaRight", .right_super },
.{ "ContextMenu", .context_menu },
});
};

Expand Down

0 comments on commit 4a8ff61

Please sign in to comment.