From 360247fe8dff71993d83108b94c47f0705d388c6 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 16 Jul 2023 09:40:37 -0700 Subject: [PATCH] windows: remove positional mods from termwiz overlay panes otherwise, the termwiz line reader can become confused and fail to recognize key presses like `(` which have SHIFT and LEFT_SHIFT set. refs: https://github.com/wez/wezterm/issues/3999 --- docs/changelog.md | 1 + mux/src/termwiztermtab.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 6d9caa0ef8a..64d5fb3522c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -45,6 +45,7 @@ As features stabilize some brief notes about them will accumulate here. #### Fixed * Command Palette was using now-invalid Nerd Font 2.0 symbols for macOS keyboard shortcuts. #3988 +* Windows: couldn't use shifted keys like `(` in the Debug Overlay. #3999 ### 20230712-072601-f4abf8fd diff --git a/mux/src/termwiztermtab.rs b/mux/src/termwiztermtab.rs index daee8db8391..8e3ab60b260 100644 --- a/mux/src/termwiztermtab.rs +++ b/mux/src/termwiztermtab.rs @@ -210,7 +210,10 @@ impl Pane for TermWizTerminalPane { } fn key_down(&self, key: KeyCode, modifiers: KeyModifiers) -> anyhow::Result<()> { - let event = InputEvent::Key(KeyEvent { key, modifiers }); + let event = InputEvent::Key(KeyEvent { + key, + modifiers: modifiers.remove_positional_mods(), + }); if let Err(e) = self.input_tx.send(event) { *self.dead.lock() = true; return Err(e.into());