1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-26 16:34:23 +03:00

macOS: fix Shift-Tab

refs: https://github.com/wez/wezterm/issues/1902
This commit is contained in:
Wez Furlong 2022-04-21 18:38:27 -07:00
parent 55174056b9
commit 26500c675f

View File

@ -1494,7 +1494,7 @@ impl WindowView {
| "moveDown:"
| "moveDownAndModifySelection:"
| "insertTab:"
| "insertBackTab:"
| "insertBacktab:"
| "insertNewline:"
| "cancelOperation:"
| "deleteBackward:"
@ -2028,6 +2028,15 @@ impl WindowView {
unmod
};
// Shift-Tab on macOS produces \x19 for some reason.
// Rewrite it to something we understand.
// <https://github.com/wez/wezterm/issues/1902>
let chars = if virtual_key == super::keycodes::kVK_Tab && modifiers == Modifiers::SHIFT {
"\t"
} else {
chars
};
let phys_code = super::keycodes::vkey_to_phys(virtual_key);
let raw_key_handled = Handled::new();
let raw_key_event = RawKeyEvent {