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
@@ -58,6 +58,8 @@ pub struct KeyFacts {
|
||||
pub repeat: bool,
|
||||
/// The key's own character, where gpui named the one Shift made and dropped Shift.
|
||||
pub unshifted: Option<char>,
|
||||
/// AppKit's key code, which Shift does not change.
|
||||
pub code: Option<u16>,
|
||||
}
|
||||
|
||||
/// The facts of the key event AppKit is handling now, which gpui named `name`, with `shift` or not.
|
||||
@@ -89,6 +91,7 @@ pub fn key_facts(name: &str, shift: bool) -> anyhow::Result<KeyFacts> {
|
||||
right_option: flags & RIGHT_OPTION != 0,
|
||||
repeat,
|
||||
unshifted,
|
||||
code: Some(code),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user