mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Forgot to stub out one method for the test
This commit is contained in:
@@ -69,11 +69,7 @@ class Mappings:
|
|||||||
|
|
||||||
def update_keymap(self, global_shortcuts:Optional[Dict[str, SingleKey]] = None) -> None:
|
def update_keymap(self, global_shortcuts:Optional[Dict[str, SingleKey]] = None) -> None:
|
||||||
if global_shortcuts is None:
|
if global_shortcuts is None:
|
||||||
if is_macos:
|
global_shortcuts = self.set_cocoa_global_shortcuts(self.get_options()) if is_macos else {}
|
||||||
from .main import set_cocoa_global_shortcuts
|
|
||||||
global_shortcuts = set_cocoa_global_shortcuts(self.get_options())
|
|
||||||
else:
|
|
||||||
global_shortcuts = {}
|
|
||||||
self.global_shortcuts_map: KeyMap = {v: [KeyDefinition(definition=k)] for k, v in global_shortcuts.items()}
|
self.global_shortcuts_map: KeyMap = {v: [KeyDefinition(definition=k)] for k, v in global_shortcuts.items()}
|
||||||
self.global_shortcuts = global_shortcuts
|
self.global_shortcuts = global_shortcuts
|
||||||
self.keyboard_modes = self.get_options().keyboard_modes.copy()
|
self.keyboard_modes = self.get_options().keyboard_modes.copy()
|
||||||
@@ -224,4 +220,8 @@ class Mappings:
|
|||||||
b = get_boss()
|
b = get_boss()
|
||||||
if b.args.debug_keyboard:
|
if b.args.debug_keyboard:
|
||||||
print(*args, end=end, flush=True)
|
print(*args, end=end, flush=True)
|
||||||
|
|
||||||
|
def set_cocoa_global_shortcuts(self, opts: Options) -> Dict[str, SingleKey]:
|
||||||
|
from .main import set_cocoa_global_shortcuts
|
||||||
|
return set_cocoa_global_shortcuts(opts)
|
||||||
# }}}
|
# }}}
|
||||||
|
|||||||
@@ -553,6 +553,9 @@ class TestKeys(BaseTest):
|
|||||||
def set_ignore_os_keyboard_processing(self, on: bool) -> None:
|
def set_ignore_os_keyboard_processing(self, on: bool) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def set_cocoa_global_shortcuts(self, opts):
|
||||||
|
return {}
|
||||||
|
|
||||||
def get_options(self):
|
def get_options(self):
|
||||||
return self.options
|
return self.options
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user