mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix key-presses mapped to CSI codes not respecting SC81t mode
This commit is contained in:
@@ -140,7 +140,11 @@ send_key_to_child(Window *w, int key, int mods, int action) {
|
|||||||
const char *data = key_to_bytes(key, screen->modes.mDECCKM, screen->modes.mEXTENDED_KEYBOARD, mods, action);
|
const char *data = key_to_bytes(key, screen->modes.mDECCKM, screen->modes.mEXTENDED_KEYBOARD, mods, action);
|
||||||
if (data) {
|
if (data) {
|
||||||
if (screen->modes.mEXTENDED_KEYBOARD) write_escape_code_to_child(screen, APC, data + 1);
|
if (screen->modes.mEXTENDED_KEYBOARD) write_escape_code_to_child(screen, APC, data + 1);
|
||||||
else schedule_write_to_child(w->id, (data + 1), *data);
|
else {
|
||||||
|
if (*data > 2 && data[1] == 0x1b && data[2] == '[') { // CSI code
|
||||||
|
write_escape_code_to_child(screen, CSI, data + 3);
|
||||||
|
} else schedule_write_to_child(w->id, (data + 1), *data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user