1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

window: fix CTRL-[ on macos

This is another key combination that doesn't generate a key-down
event.

refs: https://github.com/wez/wezterm/issues/1877
This commit is contained in:
Wez Furlong 2022-04-15 20:51:01 -07:00
parent fdb3471017
commit a4b68247bb

View File

@ -1997,7 +1997,10 @@ impl WindowView {
// CTRL-Tab only delivers a key-up event, and never a // CTRL-Tab only delivers a key-up event, and never a
// key-down event. So we just pretend that key-up is // key-down event. So we just pretend that key-up is
// key-down. // key-down.
let key_is_down = if virtual_key == super::keycodes::kVK_Tab // Same for CTRL-[
// <https://github.com/wez/wezterm/issues/1877>
let key_is_down = if (virtual_key == super::keycodes::kVK_Tab
|| virtual_key == super::keycodes::kVK_ANSI_LeftBracket)
&& modifiers.contains(Modifiers::CTRL) && modifiers.contains(Modifiers::CTRL)
&& !key_is_down && !key_is_down
{ {