From 59b8664eb3ff01d0a29eecbabe72b34d944dc829 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 6 Aug 2023 16:15:35 -0700 Subject: [PATCH] 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 --- wezterm-input-types/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wezterm-input-types/src/lib.rs b/wezterm-input-types/src/lib.rs index f869121b3..1699ecca8 100644 --- a/wezterm-input-types/src/lib.rs +++ b/wezterm-input-types/src/lib.rs @@ -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 { } /// + #[deny(warnings)] fn kitty_function_code(&self) -> Option { use KeyCode::*; Some(match self.key {