mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Keyboard maps should be respected in extended keyboard mode as well
This commit is contained in:
@@ -135,13 +135,13 @@ def extended_key_event(key, scancode, mods, action):
|
|||||||
|
|
||||||
def interpret_key_event(key, scancode, mods, window, action):
|
def interpret_key_event(key, scancode, mods, window, action):
|
||||||
screen = window.screen
|
screen = window.screen
|
||||||
|
key = get_localized_key(key, scancode)
|
||||||
if screen.extended_keyboard:
|
if screen.extended_keyboard:
|
||||||
return extended_key_event(key, scancode, mods, action)
|
return extended_key_event(key, scancode, mods, action)
|
||||||
data = bytearray()
|
data = bytearray()
|
||||||
if action == defines.GLFW_PRESS or (
|
if action == defines.GLFW_PRESS or (
|
||||||
action == defines.GLFW_REPEAT and screen.auto_repeat_enabled
|
action == defines.GLFW_REPEAT and screen.auto_repeat_enabled
|
||||||
):
|
):
|
||||||
key = get_localized_key(key, scancode)
|
|
||||||
if mods == defines.GLFW_MOD_CONTROL and key in control_codes:
|
if mods == defines.GLFW_MOD_CONTROL and key in control_codes:
|
||||||
# Map Ctrl-key to ascii control code
|
# Map Ctrl-key to ascii control code
|
||||||
data.extend(control_codes[key])
|
data.extend(control_codes[key])
|
||||||
|
|||||||
Reference in New Issue
Block a user