diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-30 16:33:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-30 16:33:26 +0300 |
| commit | 800a8c1a7a73c383fc97d4e5b6febf7f3249e948 (patch) | |
| tree | 287677cb2a8aaa98aa529e847dda34fe688fc459 /src/app | |
| parent | fff21d64905cc50424aec698c88965aefd2df724 (diff) | |
fix ghostty macos arrow and modifier key parsing
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/input.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/app/input.rs b/src/app/input.rs index bc607221..56eda4f2 100644 --- a/src/app/input.rs +++ b/src/app/input.rs @@ -152,7 +152,22 @@ impl App { crate::input::KeyboardProtocol::from_kitty_flags(flags), ); if bytes.is_empty() { - warn!(code = ?key_event.code, mods = ?key_event.modifiers, state = ?key_event.state, "key produced empty encoding"); + if key.kind != crossterm::event::KeyEventKind::Release + && !matches!( + key.code, + KeyCode::CapsLock + | KeyCode::ScrollLock + | KeyCode::NumLock + | KeyCode::PrintScreen + | KeyCode::Pause + | KeyCode::Menu + | KeyCode::KeypadBegin + | KeyCode::Media(_) + | KeyCode::Modifier(_) + ) + { + warn!(code = ?key_event.code, mods = ?key_event.modifiers, state = ?key_event.state, "key produced empty encoding"); + } } else { let _ = rt.sender.send(Bytes::from(bytes)).await; } |
