mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
Make alt+backspace delete the previous word
i.e. alt+backspace now sends ^W (werase). THis matches the behavior of terminal.app and gnome-terminal. Fixes #264
This commit is contained in:
@@ -26,7 +26,13 @@ def modify_complex_key(name, amt):
|
||||
|
||||
control_codes = {}
|
||||
smkx_key_map = {}
|
||||
alt_codes = {defines.GLFW_KEY_TAB: b'\033\t', defines.GLFW_KEY_ENTER: b'\033\r', defines.GLFW_KEY_ESCAPE: b'\033\033', defines.GLFW_KEY_BACKSPACE: b'\033\177'}
|
||||
alt_codes = {
|
||||
defines.GLFW_KEY_TAB: b'\033\t',
|
||||
defines.GLFW_KEY_ENTER: b'\033\r',
|
||||
defines.GLFW_KEY_ESCAPE: b'\033\033',
|
||||
# alt+bs matches iTerm and gnome-terminal
|
||||
defines.GLFW_KEY_BACKSPACE: b'\x17'
|
||||
}
|
||||
shift_alt_codes = alt_codes.copy()
|
||||
shift_alt_codes[defines.GLFW_KEY_TAB] = key_as_bytes('kcbt')
|
||||
alt_mods = (defines.GLFW_MOD_ALT, defines.GLFW_MOD_SHIFT | defines.GLFW_MOD_ALT)
|
||||
|
||||
Reference in New Issue
Block a user