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 Jan 16, 2025
1 parent a185ce3 commit cde4043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/input/key.zig
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ pub const Key = enum(c_int) {
backspace,
print_screen,
pause,
context_menu,

// function keys
f1,
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 cde4043

Please sign in to comment.