From eabfa3c0f888d957d82927d8d27f1a2eee1f4096 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 23 Nov 2020 14:18:49 -0800 Subject: [PATCH] term: fix ALT-Escape This appears to have been accidentally broken as part of the churn around building out CSI-u key encoding in 6289c08a4ebfd7d01a6bb9354bbc0466ccc52bff closes: https://github.com/wez/wezterm/issues/338 --- docs/changelog.markdown | 1 + term/src/terminalstate.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.markdown b/docs/changelog.markdown index dd2f4b4a8..8bb297b76 100644 --- a/docs/changelog.markdown +++ b/docs/changelog.markdown @@ -20,6 +20,7 @@ brief notes about them may accumulate here. * Added `SemanticZone` as a possible parameter for [SelectTextAtMouseCursor](config/lua/keyassignment/SelectTextAtMouseCursor.md), making it possible to conveniently select complete input or output regions. * Improved font rendering [#320](https://github.com/wez/wezterm/issues/320) [#331](https://github.com/wez/wezterm/issues/331) * Updated internal harfbuzz shaper to 2.7.2 +* Fixed ALT-Escape not sending ESC-ESC [#338](https://github.com/wez/wezterm/issues/338) ### 20201101-103216-403d002d diff --git a/term/src/terminalstate.rs b/term/src/terminalstate.rs index 40149d7c8..1a303a5af 100644 --- a/term/src/terminalstate.rs +++ b/term/src/terminalstate.rs @@ -821,7 +821,7 @@ impl TerminalState { if mods.contains(KeyModifiers::SHIFT) || mods.contains(KeyModifiers::CTRL) { self.csi_u_encode(&mut buf, c, mods)?; } else { - if mods.contains(KeyModifiers::ALT) && key != Escape { + if mods.contains(KeyModifiers::ALT) { buf.push(0x1b as char); } buf.push(c);