1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 05:12:40 +03:00

fixup F21+ handling

The warnings were not noticed in the original PR.
Those warnings were actually errors.
Promote warnings to error in the mapping logic to prevent
this sort of thing from slipping through in the future,
and fixup the errors.

refs: #3935
refs: #3937
This commit is contained in:
Wez Furlong 2023-08-06 16:15:35 -07:00
parent 211bce5037
commit 59b8664eb3
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -762,6 +762,10 @@ pub enum PhysKeyCode {
F19,
F2,
F20,
F21,
F22,
F23,
F24,
F3,
F4,
F5,
@ -903,6 +907,10 @@ impl PhysKeyCode {
Self::F18 => KeyCode::Function(18),
Self::F19 => KeyCode::Function(19),
Self::F20 => KeyCode::Function(20),
Self::F21 => KeyCode::Function(21),
Self::F22 => KeyCode::Function(22),
Self::F23 => KeyCode::Function(23),
Self::F24 => KeyCode::Function(24),
Self::Keypad0 => KeyCode::Numpad(0),
Self::Keypad1 => KeyCode::Numpad(1),
Self::Keypad2 => KeyCode::Numpad(2),
@ -1256,6 +1264,7 @@ impl RawKeyEvent {
}
/// <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions>
#[deny(warnings)]
fn kitty_function_code(&self) -> Option<u32> {
use KeyCode::*;
Some(match self.key {