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:
This commit is contained in:
8 files changed
+90
-47
No files matched your search
@@ -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", "")
|
||||
|
||||
Reference in new issue
Block a user