unicode input kitten: Also allow using ctrl+number to switch tabs and pressing any modifier with the function keys

This commit is contained in:
Kovid Goyal
2021-11-17 12:17:46 +05:30
parent 185669ec72
commit 77d7a6180f
3 changed files with 15 additions and 8 deletions

7
kitty/key_encoding.py generated
View File

@@ -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