Gestures
Bind taps, swipes, pinches, drags, and long-presses on the terminal, header, toolbar, and D-pad, and drive mouse-aware programs like tmux, herdr, and vim by touch.
A phone is a touch device, and Moshi's terminal treats it that way. Most common terminal actions — paste, dictate, switch sessions, send Escape, zoom a tmux pane — can be bound to a tap, swipe, drag, pinch, or long-press so you rarely need the toolbar's labelled buttons.
Configure gestures in Settings -> Input -> Gestures.
Why gestures matter
Two reasons gestures get more important on a phone than on a laptop:
- The keyboard fights you. A software keyboard already covers half the screen. Reaching for an on-screen button is slower than a swipe across what you're already looking at.
- Agents prompt often. Coding agents ask for approval, pause for input, and offer suggestions every few seconds. A double-tap-to-paste or a swipe-to-switch-window beats a precise tap on a small target every time.
Where gestures live
Moshi binds gestures across four surfaces:
- Terminal body — taps, double-tap, triple-tap, swipe, pinch, and a scroll-down threshold on the terminal screen itself.
- Terminal header — soft and hard pull-downs from the top of the session.
- Toolbar buttons — alternate actions on the keyboard, mic, Ctrl, shortcuts, and D-pad buttons (tap, double-tap, long-press).
- D-pad slots — the top-left and top-right corners of the D-pad are configurable shortcut slots.
Each binding lists the actions allowed for that gesture and shows the current choice with the default in muted text and a custom choice in accent.
Body gestures
Defaults on the terminal surface:
The swipe defaults follow the multiplexer's own hierarchy: one finger moves between windows/tabs, two fingers sideways move between panes, and two fingers up/down move a level higher — tmux sessions or Herdr workspaces. Each axis is remappable, so you can point any of the three swipes at any of the three levels (or a custom shortcut) if a different split suits you. Zellij can only leave a session by detaching, so the vertical two-finger swipe has nothing to drive there and tells you so.
Touch mouse
Programs such as tmux (with set -g mouse on), herdr, and vim (with set mouse=a) can take mouse input to select text, resize panes, or open menus. Touch mouse sends your finger to them as a mouse.
Add Mouse to the toolbar in Settings -> Input -> Toolbar, then tap it to turn touch mouse on. With it on, and while the program in front is using the mouse:
- Press and hold, then drag — after a short hold and a haptic tick, the drag reaches the program as a mouse drag, so it draws its own selection or moves its own divider. A loupe magnifies the spot under your finger while you drag.
- Quick swipe — still scrolls, as usual.
- Two-finger tap — sends a right-click where you tapped, for herdr's context menus and other right-click menus.
When the program isn't using the mouse, the same press and hold works as it normally does in Moshi. The Mouse toggle is remembered across launches; removing the button from the toolbar turns it off.
For a single right-click without turning touch mouse on, add R-Click to the toolbar: tap it, then tap the terminal. If the program isn't using the mouse, Moshi shows Right click unavailable instead.
Trackpad and mouse
With a trackpad or mouse connected, as on an iPad with a Magic Keyboard, no toggle is needed. A click-drag and a right-click go straight to tmux, herdr, vim, and other programs that use the mouse. Elsewhere, a click-drag selects text in Moshi and a right-click opens the copy menu for the selection or the word you clicked.
Header gestures
The session header has two pull-down depths so a short pull and a long pull can do different things:
Toolbar gestures
The same toolbar button can do multiple things based on how you touch it. Examples of the actions available:
The full list — including which actions are allowed per gesture — is enumerated on the Gestures settings screen.
D-pad slots
The D-pad's two top corners are shortcut slots. Each slot can be set to:
- Hide — leave the corner empty.
- Delete — send Backspace (useful when typing into agents that swallow Backspace from the toolbar).
- Interrupt — clear the current line / send a soft cancel.
- Custom shortcut — bind any captured key sequence built in the shortcut builder.
Hiding a slot is useful on smaller phones where the corners crowd the diagonal arrows.
Custom shortcuts in gestures
Most gestures accept Custom shortcut as an action. Choosing it opens the same shortcut builder used elsewhere in Moshi, so any key sequence you can type — Ctrl+R, Esc :wq, a tmux prefix chord, an agent prompt fragment, or an advanced multi-step binding such as C-b, S-t — can be bound to a swipe or a long-press. See Keyboard and shortcuts for how the builder works.
Reset
The Gestures screen has a Reset all button at the bottom. It returns every binding to its default and clears any custom shortcut attached to a gesture or D-pad slot. Use it if you've experimented yourself into a corner.