Commit 5f4e12e
committed
Cycle tabs with Cmd+Left/Right
Ctrl+Tab was the only way to step between tabs, which is an awkward
reach next to the ⌘-based tab shortcuts already in the panel. Bind
Cmd+← / Cmd+→ to the same selectPreviousSession/selectNextSession pair —
they already wrap with a modulo, so Cmd+← from the first tab lands on
the last.
The binding lives in TerminalPanel.performKeyEquivalent, but the arrow
keys are also claimed by ClickThroughTerminalView's key monitor, which
encodes them for the shell and ignores ⌘ when deriving the CSI modifier
parameter — so ⌘← would otherwise reach the shell as a bare left arrow.
Pass ⌘-only arrows through there instead. Local monitors run before
key-equivalent dispatch, but this works either way: whichever sees the
event first, the other never gets a chance to mis-handle it.
Reserved in ReservedShortcut so the quick-input recorder rejects ⌘←/⌘→;
⌘⌥← and friends stay bindable. 117 tests in 9 suites pass.1 parent aea4e55 commit 5f4e12e
5 files changed
Lines changed: 33 additions & 0 deletions
File tree
- NotchyTests
- Notchy
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
521 | 529 | | |
522 | 530 | | |
523 | 531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
403 | 414 | | |
404 | 415 | | |
405 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments