mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix keyboard shortcuts not being mapped correctly
On systems that remap their keys, for example, to use a DVORAK keyboard layout. Fixes #29
This commit is contained in:
@@ -259,7 +259,7 @@ class Boss(Thread):
|
||||
self.start_cursor_blink()
|
||||
self.cursor_blink_zero_time = monotonic()
|
||||
if action == GLFW_PRESS or action == GLFW_REPEAT:
|
||||
func = get_shortcut(self.opts.keymap, mods, key)
|
||||
func = get_shortcut(self.opts.keymap, mods, key, scancode)
|
||||
if func is not None:
|
||||
f = getattr(self, func, None)
|
||||
if f is not None:
|
||||
|
||||
@@ -84,5 +84,6 @@ def interpret_text_event(codepoint, mods):
|
||||
return data
|
||||
|
||||
|
||||
def get_shortcut(keymap, mods, key):
|
||||
def get_shortcut(keymap, mods, key, scancode):
|
||||
key = get_localized_key(key, scancode)
|
||||
return keymap.get((mods & 0b1111, key))
|
||||
|
||||
Reference in New Issue
Block a user