Keyboard shortcuts
mocante takes its shortcuts before the terminal does, so they work while a full-screen program such as an agent’s TUI has the keyboard. They also work while a page in the built-in browser has the keyboard.
Press ⌘? (Ctrl+? on Linux) to see this list in the app. Context menus and the command palette show the shortcut beside each action that has one.
macOS and Linux
Section titled “macOS and Linux”On Linux, Ctrl takes the place of ⌘ in every shortcut, with these exceptions:
- Jump to a session by position is
Alt+1toAlt+9, becauseCtrl+1toCtrl+9jump to tabs. - Back and forward are
Alt+←andAlt+→, becauseCtrl+[is Escape in a terminal. - Replace in file is
Ctrl+H, and replace across the worktree isCtrl+Shift+H, becauseAlttypes characters on some layouts.
On macOS the ⌘ shortcuts do not also accept Ctrl. Ctrl+W, Ctrl+K and Ctrl+B reach the shell and tmux as usual.
Global
Section titled “Global”| Action | macOS | Linux |
|---|---|---|
| Command palette, waiting agents first | ⌘K |
Ctrl+K |
| Command palette, commands mode | ⌘⇧P |
Ctrl+Shift+P |
| Show or hide the sidebar | ⌘B |
Ctrl+B |
| Settings | ⌘, |
Ctrl+, |
| Keyboard shortcuts | ⌘? |
Ctrl+? |
| Close a dialog or the palette | Esc |
Esc |
| Submit a dialog | ↵ |
Enter |
In a dialog, an open suggestion list takes ↵ first.
Tabs and sessions
Section titled “Tabs and sessions”| Action | macOS | Linux |
|---|---|---|
| New shell tab in this session | ⌘T or ⌥⇧T |
Ctrl+T or Alt+Shift+T |
| Close the current tab | ⌘W or ⌥⇧W |
Ctrl+W or Alt+Shift+W |
| Previous or next tab | ⌘⇧[ / ⌘⇧], or ⌥⇧[ / ⌥⇧] |
Ctrl+Shift+[ / Ctrl+Shift+], or Alt+Shift+[ / Alt+Shift+] |
| Previous or next tab | Ctrl+PageUp / Ctrl+PageDown |
Ctrl+PageUp / Ctrl+PageDown |
| Jump to tab 1 to 9 | ⌘1 to ⌘9 |
Ctrl+1 to Ctrl+9 |
| Jump to session 1 to 9, by its place in the sidebar | ⌃1 to ⌃9 |
Alt+1 to Alt+9 |
| Previous or next session | ⌘⌥↑ / ⌘⌥↓ |
Ctrl+Alt+↑ / Ctrl+Alt+↓ |
| Previous or next session that needs you | ⌘⌥⇧↑ / ⌘⌥⇧↓ |
Ctrl+Alt+Shift+↑ / Ctrl+Alt+Shift+↓ |
“Needs you” means an agent that waits for input or has failed.
Switching tabs moves the keyboard into that tab’s terminal, so you can type at once. ⌘W does nothing on the last tab of a session. Close the session instead.
Navigation and panes
Section titled “Navigation and panes”| Action | macOS | Linux |
|---|---|---|
| Go back or forward through the places you visited | ⌘[ / ⌘] |
Alt+← / Alt+→ |
| Move the keyboard to the previous or next pane | ⌘⌥← / ⌘⌥→ |
Ctrl+Alt+← / Ctrl+Alt+→ |
| Show or hide the code pane | ⌘⇧E |
Ctrl+Shift+E |
See panes for how panes sit side by side.
Terminal
Section titled “Terminal”| Action | macOS | Linux |
|---|---|---|
| Copy the selection | ⌘C |
— |
| Paste | ⌘V |
— |
On Linux, Ctrl+C is the terminal’s interrupt, so use the terminal’s context menu to copy and paste.
Code view
Section titled “Code view”While the code view has the keyboard, the tab shortcuts act on code tabs: ⌘T opens a worktree browser, ⌘W closes the code tab, and the next, previous and number shortcuts move between code tabs.
| Action | macOS | Linux |
|---|---|---|
| Go to file | ⌘P |
Ctrl+P |
| Find in file | ⌘F |
Ctrl+F |
| Replace in file | ⌘⌥F |
Ctrl+H |
| Search the worktree | ⌘⇧F |
Ctrl+Shift+F |
| Search and replace across the worktree | ⌘⌥⇧F |
Ctrl+Shift+H |
| Save the file | ⌘S |
Ctrl+S |
Go to file and find in file work only in the code view, because a shell uses Ctrl+P, Ctrl+F and Ctrl+H itself. The two worktree searches work from anywhere and open the code pane. See code view.
Browser
Section titled “Browser”| Action | macOS | Linux |
|---|---|---|
| Select the address bar | ⌘L |
Ctrl+L |
This works only while the browser pane has the keyboard, because Ctrl+L clears a terminal. See browser.
| Action | macOS | Linux |
|---|---|---|
| Collapse the other projects, or expand all again | ⌥-click a project’s caret |
Alt-click a project’s caret |
| Show a pane on its own | ⌥-click its button in the session header |
Alt-click its button |
| Make a pane follow the session in view | ⇧-click its button in the session header |
Shift-click its button |
| Open a pop-out window that follows the session in view | ⇧-click the pop-out button |
Shift-click the pop-out button |
In a browser tab
Section titled “In a browser tab”When you use the web UI in a browser, the browser keeps some shortcuts for its own tab strip and never passes them to the page. Nothing mocante does can get them back:
- Chrome on macOS keeps
⌘T,⌘W,⌘⇧[/⌘⇧], and⌘1to⌘9. - Chrome on Linux and Windows keeps
Ctrl+T,Ctrl+W,Ctrl+1toCtrl+9,Ctrl+PageUpandCtrl+PageDown.
Use these instead:
| Action | macOS | Linux |
|---|---|---|
| New tab | ⌥⇧T |
Alt+Shift+T |
| Close tab | ⌥⇧W |
Alt+Shift+W |
| Previous or next tab | ⌥⇧[ / ⌥⇧] |
Alt+Shift+[ / Alt+Shift+] |
| Jump to a session | ⌃1 to ⌃9 |
Alt+1 to Alt+9 |
In the web UI, menus and the palette show these forms.