mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-13 04:03:16 +02:00
unicode input kitten: Also allow using ctrl+number to switch tabs and pressing any modifier with the function keys
This commit is contained in:
7
kitty/key_encoding.py
generated
7
kitty/key_encoding.py
generated
@@ -227,6 +227,13 @@ class KeyEvent(NamedTuple):
|
||||
return True
|
||||
return False
|
||||
|
||||
def matches_without_mods(self, spec: Union[str, ParsedShortcut], types: int = EventType.PRESS | EventType.REPEAT) -> bool:
|
||||
if not self.type & types:
|
||||
return False
|
||||
if isinstance(spec, str):
|
||||
spec = parse_shortcut(spec)
|
||||
return self.key == spec[1]
|
||||
|
||||
def matches_text(self, text: str, case_sensitive: bool = False) -> bool:
|
||||
if case_sensitive:
|
||||
return self.text == text
|
||||
|
||||
Reference in New Issue
Block a user