mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
Refactor key encoding
Cannot have key names in global namespace as not all key names are valid python identifiers. So move them into a dict.
This commit is contained in:
@@ -19,8 +19,8 @@ from kitty.fast_data_types import (
|
||||
close_tty, normal_tty, open_tty, parse_input_from_terminal, raw_tty
|
||||
)
|
||||
from kitty.key_encoding import (
|
||||
ALT, CTRL, PRESS, RELEASE, REPEAT, SHIFT, C, D, backspace_key,
|
||||
decode_key_event, enter_key
|
||||
ALT, CTRL, PRESS, RELEASE, REPEAT, SHIFT, backspace_key,
|
||||
decode_key_event, enter_key, K
|
||||
)
|
||||
from kitty.utils import screen_size_function, write_all
|
||||
|
||||
@@ -28,6 +28,9 @@ from .handler import Handler
|
||||
from .operations import init_state, reset_state
|
||||
|
||||
|
||||
C, D = K['C'], K['D']
|
||||
|
||||
|
||||
def debug(*a, **kw):
|
||||
from base64 import standard_b64encode
|
||||
buf = io.StringIO()
|
||||
|
||||
Reference in New Issue
Block a user