Support extended keys on Mac (insert, f13-f19) (#16921)

- Improved support for extended keyboards on Mac (F13-F19, Insert)
This commit is contained in:
Peter Tripp 2024-08-27 09:09:57 -04:00 committed by GitHub
parent 2b08e2abe5
commit d3d0c043f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 3 deletions

View file

@ -162,9 +162,10 @@ impl Keystroke {
fn is_printable_key(key: &str) -> bool {
match key {
"up" | "down" | "left" | "right" | "pageup" | "pagedown" | "home" | "end" | "delete"
| "escape" | "backspace" | "f1" | "f2" | "f3" | "f4" | "f5" | "f6" | "f7" | "f8" | "f9"
| "f10" | "f11" | "f12" => false,
"f1" | "f2" | "f3" | "f4" | "f5" | "f6" | "f7" | "f8" | "f9" | "f10" | "f11" | "f12"
| "f13" | "f14" | "f15" | "f16" | "f17" | "f18" | "f19" | "backspace" | "delete"
| "left" | "right" | "up" | "down" | "pageup" | "pagedown" | "insert" | "home" | "end"
| "escape" => false,
_ => true,
}
}