Revert change to make alt+bs emit werase

Most linux terminals emit ESC+BS instead. And iTerm2 in Esc+ mode also
emits this. So go with the majority for greatest ecosystem
compatibility. Fixes #264
This commit is contained in:
Kovid Goyal 2018-02-22 13:51:14 +05:30
parent 95384d437a
commit 1e4963e727
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 10 deletions

16
kitty/keys.h generated
View File

@ -928,7 +928,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x02\x1b\x09";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x33\x7e";
case 55: // DELETE
@ -1079,7 +1079,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x03\x1b\x5b\x5a";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x34\x7e";
case 55: // DELETE
@ -2134,7 +2134,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x02\x1b\x09";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x33\x7e";
case 55: // DELETE
@ -2285,7 +2285,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x03\x1b\x5b\x5a";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x34\x7e";
case 55: // DELETE
@ -3348,7 +3348,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x02\x1b\x09";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x33\x7e";
case 55: // DELETE
@ -3499,7 +3499,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x03\x1b\x5b\x5a";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x34\x7e";
case 55: // DELETE
@ -4554,7 +4554,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x02\x1b\x09";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x33\x7e";
case 55: // DELETE
@ -4705,7 +4705,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
case 52: // TAB
return "\x03\x1b\x5b\x5a";
case 53: // BACKSPACE
return "\x01\x17";
return "\x02\x1b\x7f";
case 54: // INSERT
return "\x06\x1b\x5b\x32\x3b\x34\x7e";
case 55: // DELETE

View File

@ -30,8 +30,7 @@ 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'
defines.GLFW_KEY_BACKSPACE: b'\033\177'
}
shift_alt_codes = alt_codes.copy()
shift_alt_codes[defines.GLFW_KEY_TAB] = key_as_bytes('kcbt')