mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 02:31:45 +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:
@@ -3,7 +3,14 @@
|
||||
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
from kitty.fast_data_types import truncate_point_for_length, wcswidth
|
||||
from kitty.key_encoding import RELEASE, HOME, END, BACKSPACE, DELETE, LEFT, RIGHT
|
||||
from kitty.key_encoding import RELEASE, K
|
||||
|
||||
HOME = K['HOME']
|
||||
END = K['END']
|
||||
BACKSPACE = K['BACKSPACE']
|
||||
DELETE = K['DELETE']
|
||||
LEFT = K['LEFT']
|
||||
RIGHT = K['RIGHT']
|
||||
|
||||
|
||||
class LineEdit:
|
||||
|
||||
Reference in New Issue
Block a user