Skip to content

Commit

Permalink
macOS: Fix macos_option_as_alt not working when caps lock is engaged
Browse files Browse the repository at this point in the history
Fixes #7836
  • Loading branch information
kovidgoyal committed Sep 9, 2024
1 parent ae26bf7 commit c166589
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Detailed list of changes

- macOS: Fix shortcuts that become entries in the global menubar being reported as removed shortcuts in the debug output

- macOS: Fix :opt:`macos_option_as_alt` not working when :kbd:`caps lock` is engaged (:iss:`7836`)

0.36.2 [2024-09-06]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions kitty/glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ static GLFWwindow *apple_preserve_common_context = NULL;

static int
filter_option(int key UNUSED, int mods, unsigned int native_key UNUSED, unsigned long flags) {
mods &= ~(GLFW_MOD_NUM_LOCK | GLFW_MOD_CAPS_LOCK);
if ((mods == GLFW_MOD_ALT) || (mods == (GLFW_MOD_ALT | GLFW_MOD_SHIFT))) {
if (OPT(macos_option_as_alt) == 3) return 1;
if (cocoa_alt_option_key_pressed(flags)) return 1;
Expand Down

0 comments on commit c166589

Please sign in to comment.