Fix Ctrl+backspace acting as plain backspace in normal and application keyboard modes. Fixes #538
This commit is contained in:
parent
0f9613eb9e
commit
7ec989d485
8
kitty/keys.h
generated
8
kitty/keys.h
generated
@ -761,7 +761,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
|
|||||||
case 52: // TAB
|
case 52: // TAB
|
||||||
return "\x01\x09";
|
return "\x01\x09";
|
||||||
case 53: // BACKSPACE
|
case 53: // BACKSPACE
|
||||||
return "\x01\x7f";
|
return "\x01\x08";
|
||||||
case 54: // INSERT
|
case 54: // INSERT
|
||||||
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
||||||
case 55: // DELETE
|
case 55: // DELETE
|
||||||
@ -2384,7 +2384,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
|
|||||||
case 52: // TAB
|
case 52: // TAB
|
||||||
return "\x01\x09";
|
return "\x01\x09";
|
||||||
case 53: // BACKSPACE
|
case 53: // BACKSPACE
|
||||||
return "\x01\x7f";
|
return "\x01\x08";
|
||||||
case 54: // INSERT
|
case 54: // INSERT
|
||||||
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
||||||
case 55: // DELETE
|
case 55: // DELETE
|
||||||
@ -4016,7 +4016,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
|
|||||||
case 52: // TAB
|
case 52: // TAB
|
||||||
return "\x01\x09";
|
return "\x01\x09";
|
||||||
case 53: // BACKSPACE
|
case 53: // BACKSPACE
|
||||||
return "\x01\x7f";
|
return "\x01\x08";
|
||||||
case 54: // INSERT
|
case 54: // INSERT
|
||||||
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
||||||
case 55: // DELETE
|
case 55: // DELETE
|
||||||
@ -5639,7 +5639,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) {
|
|||||||
case 52: // TAB
|
case 52: // TAB
|
||||||
return "\x01\x09";
|
return "\x01\x09";
|
||||||
case 53: // BACKSPACE
|
case 53: // BACKSPACE
|
||||||
return "\x01\x7f";
|
return "\x01\x08";
|
||||||
case 54: // INSERT
|
case 54: // INSERT
|
||||||
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
return "\x06\x1b\x5b\x32\x3b\x35\x7e";
|
||||||
case 55: // DELETE
|
case 55: // DELETE
|
||||||
|
|||||||
@ -24,7 +24,9 @@ def modify_complex_key(name, amt):
|
|||||||
return modify_key_bytes(key_as_bytes(name), amt)
|
return modify_key_bytes(key_as_bytes(name), amt)
|
||||||
|
|
||||||
|
|
||||||
control_codes = {}
|
control_codes = {
|
||||||
|
defines.GLFW_KEY_BACKSPACE: b'\x08'
|
||||||
|
}
|
||||||
smkx_key_map = {}
|
smkx_key_map = {}
|
||||||
alt_codes = {
|
alt_codes = {
|
||||||
defines.GLFW_KEY_TAB: b'\033\t',
|
defines.GLFW_KEY_TAB: b'\033\t',
|
||||||
@ -261,7 +263,7 @@ def shortcut_matches(s, mods, key, scancode):
|
|||||||
|
|
||||||
|
|
||||||
def generate_key_table():
|
def generate_key_table():
|
||||||
# To run this, use: python3 . -c "from kitty.keys import *; generate_key_table()"
|
# To run this, use: python3 . +runpy "from kitty.keys import *; generate_key_table()"
|
||||||
import os
|
import os
|
||||||
from functools import partial
|
from functools import partial
|
||||||
f = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'keys.h'), 'w')
|
f = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'keys.h'), 'w')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user