Allow defining aliases for more general actions, not just kittens

Fixes #4260
This commit is contained in:
Kovid Goyal
2021-11-22 19:52:43 +05:30
parent 727c69ffdd
commit aa4fa4cc85
16 changed files with 370 additions and 281 deletions
+4 -2
View File
@@ -112,8 +112,10 @@ def get_macos_shortcut_for(opts: Options, function: str = 'new_os_window', args:
ans = None
candidates = []
for k, v in opts.keymap.items():
if v.func == function and v.args == args:
candidates.append(k)
if len(v) == 1:
q = v[0]
if q.func == function and q.args == args:
candidates.append(k)
if candidates:
from .fast_data_types import cocoa_set_global_shortcut
alt_mods = GLFW_MOD_ALT, GLFW_MOD_ALT | GLFW_MOD_SHIFT