Work on porting kittens to use new key infrastructure

Also move type definitions into their own module
This commit is contained in:
Kovid Goyal
2021-01-14 21:35:48 +05:30
parent 0714fd376b
commit 027c5a57f1
30 changed files with 524 additions and 721 deletions

View File

@@ -9,9 +9,7 @@ from typing import Callable, Optional
from .constants import is_macos
key_name_aliases = {
'SPACE': ' ',
'SPC': ' ',
functional_key_name_aliases = {
'ESC': 'ESCAPE',
'PGUP': 'PAGE_UP',
'PAGEUP': 'PAGE_UP',
@@ -21,7 +19,17 @@ key_name_aliases = {
'ARROWUP': 'UP',
'ARROWDOWN': 'DOWN',
'ARROWRIGHT': 'RIGHT',
'ARROWLEFT': 'LEFT'
'ARROWLEFT': 'LEFT',
'DEL': 'DELETE',
}
character_key_name_aliases = {
'SPC': ' ',
'SPACE': ' ',
'PLUS': '+',
'MINUS': '-',
'HYPHEN': '-',
}
LookupFunc = Callable[[str, bool], Optional[int]]