macos: recognize CTRL-Tab
macOS only sends key up events for this, so we remap them to key down events. closes: https://github.com/wez/wezterm/issues/630
This commit is contained in:
1 parent
b441be3ac9
commit
7deb215303
2 files changed
+13
-1
No files matched your search
@@ -39,6 +39,7 @@ brief notes about them may accumulate here.
|
||||
* Fixed: added missing XTSMGRAPHICS query/response for sixel support [#609](https://github.com/wez/wezterm/issues/609)
|
||||
* Fixed: avoid showing an error dialog for synthesized `font_rules` when the configuration specifies a font that doesn't have bold/italic variants. [#617](https://github.com/wez/wezterm/issues/617)
|
||||
* New: mouse cursor hides when keyboard input is sent to a pane, and shows again when the mouse is moved. [#618](https://github.com/wez/wezterm/issues/618)
|
||||
* Fxied: macOS: CTRL-Tab key combination was not recognized. [#630](https://github.com/wez/wezterm/issues/630)
|
||||
|
||||
### 20210314-114017-04b7cedd
|
||||
|
||||
|
||||
@@ -1748,7 +1748,7 @@ impl WindowView {
|
||||
modifiers
|
||||
};
|
||||
|
||||
let event = KeyEvent {
|
||||
let mut event = KeyEvent {
|
||||
key,
|
||||
raw_key,
|
||||
modifiers,
|
||||
@@ -1759,6 +1759,17 @@ impl WindowView {
|
||||
}
|
||||
.normalize_shift();
|
||||
|
||||
// Ungh, this is a horrible special case.
|
||||
// CTRL-Tab only delivers a key-up event, and never a
|
||||
// key-down event. So we just pretend that key-up is
|
||||
// key-down.
|
||||
if event.key == KeyCode::Char('\t')
|
||||
&& event.modifiers.contains(Modifiers::CTRL)
|
||||
&& !event.key_is_down
|
||||
{
|
||||
event.key_is_down = true;
|
||||
}
|
||||
|
||||
log::debug!(
|
||||
"key_common {:?} (chars={:?} unmod={:?} modifiers={:?})",
|
||||
event,
|
||||
|
||||
Reference in new issue
Block a user