mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
Spec for extended keyboard protocol
This commit is contained in:
@@ -109,3 +109,13 @@ def interpret_text_event(codepoint, mods):
|
||||
def get_shortcut(keymap, mods, key, scancode):
|
||||
key = get_localized_key(key, scancode)
|
||||
return keymap.get((mods & 0b1111, key))
|
||||
|
||||
|
||||
def key_integer_map():
|
||||
ans = {}
|
||||
for k in dir(defines):
|
||||
if k.startswith('GLFW_KEY_'):
|
||||
val = getattr(defines, k)
|
||||
if val < defines.GLFW_KEY_LAST and val != defines.GLFW_KEY_UNKNOWN:
|
||||
ans[k[9:]] = val
|
||||
return ans
|
||||
|
||||
Reference in New Issue
Block a user