macOS: Prevent option based shortcuts for being used for global menu actions
Fixes #3515
This commit is contained in:
parent
f3c559ea13
commit
b9210a2ba4
@ -10,6 +10,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- Linux: Fix binary kitty builds not able to load fonts in WOFF2 format
|
- Linux: Fix binary kitty builds not able to load fonts in WOFF2 format
|
||||||
(:iss:`3506`)
|
(:iss:`3506`)
|
||||||
|
|
||||||
|
- macOS: Prevent :kbd:`option` based shortcuts for being used for global menu
|
||||||
|
actions (:iss:`3515`)
|
||||||
|
|
||||||
0.20.1 [2021-04-19]
|
0.20.1 [2021-04-19]
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|||||||
@ -21,9 +21,9 @@ from .constants import (
|
|||||||
is_wayland, kitty_exe, logo_png_file, running_in_kitty
|
is_wayland, kitty_exe, logo_png_file, running_in_kitty
|
||||||
)
|
)
|
||||||
from .fast_data_types import (
|
from .fast_data_types import (
|
||||||
GLFW_IBEAM_CURSOR, create_os_window, free_font_data, glfw_init,
|
GLFW_IBEAM_CURSOR, GLFW_MOD_ALT, create_os_window, free_font_data,
|
||||||
glfw_terminate, load_png_data, set_custom_cursor, set_default_window_icon,
|
glfw_init, glfw_terminate, load_png_data, set_custom_cursor,
|
||||||
set_options
|
set_default_window_icon, set_options
|
||||||
)
|
)
|
||||||
from .fonts.box_drawing import set_scale
|
from .fonts.box_drawing import set_scale
|
||||||
from .fonts.render import set_font_family
|
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
|
# Reverse list so that later defined keyboard shortcuts take priority over earlier defined ones
|
||||||
for candidate in reversed(candidates):
|
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]):
|
if cocoa_set_global_shortcut(function, candidate[0], candidate[2]):
|
||||||
ans = candidate
|
ans = candidate
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user