From 78c4c5642595c7f93455ddb0f666e3145694b92e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 7 Jan 2022 14:01:01 -0700 Subject: [PATCH] input: fix KeyCode::Physical -> termwiz KeyCode conversion refs: https://github.com/wez/wezterm/issues/1519 refs: #1483 --- wezterm-gui/src/termwindow/keyevent.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wezterm-gui/src/termwindow/keyevent.rs b/wezterm-gui/src/termwindow/keyevent.rs index 7f5f2ea6c..bdb8a6e53 100644 --- a/wezterm-gui/src/termwindow/keyevent.rs +++ b/wezterm-gui/src/termwindow/keyevent.rs @@ -421,7 +421,9 @@ impl super::TermWindow { } WK::Char('\u{1b}') => KC::Escape, WK::RawCode(_) => return Key::None, - WK::Physical(_) => return Key::None, + WK::Physical(phys) => { + return self.win_key_code_to_termwiz_key_code(&phys.to_key_code()) + } WK::Char(c) => KC::Char(*c), WK::Composed(ref s) => {