diff --git a/docs/changelog.rst b/docs/changelog.rst index 97de84267..77656b7d5 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/glfw.c b/kitty/glfw.c index 5b53fe9a5..24391efaa 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -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;