Skip to content

Commit

Permalink
windows: remove positional mods from termwiz overlay panes
Browse files Browse the repository at this point in the history
otherwise, the termwiz line reader can become confused and
fail to recognize key presses like `(` which have SHIFT and LEFT_SHIFT
set.

refs: #3999
  • Loading branch information
wez committed Jul 16, 2023
1 parent 822a766 commit 360247f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion mux/src/termwiztermtab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 360247f

Please sign in to comment.