T44: round 1 fixes: under kitty's flags the legacy bytes a key falls back to keep gpui's character, so Option-Shift-[ with only events set sends ESC { again; a key that is down is known by its key code on macOS and its virtual key on Windows, so its release goes out, as a record where its press did, though Shift came up first; shot posts a press or a release alone with down: and up:
CI / platforms (windows-latest) (push) Failing after 11s
CI / platforms (ubuntu-24.04) (push) Successful in 9m23s
CI / macos (push) Successful in 24m8s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-18 04:21:52 -04:00
1 parent fc10c4d491
commit 6f8bfaeff8
8 files changed
+90 -47

No files matched your search

+14
View File
@@ -341,6 +341,20 @@ fn kitty_reports_the_key_shift_turned_into_a_symbol() {
Some("\x1b[123;5u"),
"legacy keeps fixterms' shifted character"
);
let events = Kitty {
events: true,
..Kitty::default()
};
assert_eq!(
kitty(made("alt+{", "", Action::Press), events).as_deref(),
Some("\x1b{"),
"a flag that adds no field keeps the legacy bytes gpui's name gives"
);
let bang = Key {
unshifted: Some('1'),
..key("alt+!", "")
};
assert_eq!(kitty(bang, events).as_deref(), Some("\x1b!"));
let same = Key {
unshifted: Some('7'),
..key("ctrl+7", "")