diff --git a/docs/changelog.rst b/docs/changelog.rst index 9e237b08f..e3f00945a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,9 @@ To update |kitty|, :doc:`follow the instructions `. - Linux: Fix binary kitty builds not able to load fonts in WOFF2 format (:iss:`3506`) +- macOS: Prevent :kbd:`option` based shortcuts for being used for global menu + actions (:iss:`3515`) + 0.20.1 [2021-04-19] ---------------------- diff --git a/kitty/main.py b/kitty/main.py index f660ce264..0010bc906 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -21,9 +21,9 @@ from .constants import ( is_wayland, kitty_exe, logo_png_file, running_in_kitty ) from .fast_data_types import ( - GLFW_IBEAM_CURSOR, create_os_window, free_font_data, glfw_init, - glfw_terminate, load_png_data, set_custom_cursor, set_default_window_icon, - set_options + GLFW_IBEAM_CURSOR, GLFW_MOD_ALT, create_os_window, free_font_data, + glfw_init, glfw_terminate, load_png_data, set_custom_cursor, + set_default_window_icon, set_options ) from .fonts.box_drawing import set_scale from .fonts.render import set_font_family @@ -115,6 +115,10 @@ def get_macos_shortcut_for(opts: OptionsStub, function: str = 'new_os_window') - # Reverse list so that later defined keyboard shortcuts take priority over earlier defined ones for candidate in reversed(candidates): + if candidate.mods & GLFW_MOD_ALT: + # Option based shortcuts dont work in the global menubar, see + # https://github.com/kovidgoyal/kitty/issues/3515 + continue if cocoa_set_global_shortcut(function, candidate[0], candidate[2]): ans = candidate break