Get Moshi
input

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.

updated 2 weeks ago5 min readpage 17 / 47

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.

Swipe, pinch, drag, double-tapSwap tmux windows with a swipe, pinch to zoom, drag the header to open the switcher — every binding is remappable.
Pinch to zoom a Herdr panePinch out to focus a single Herdr pane and pinch back to restore the full layout — the zoom gesture works across multiplexers.

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:

Tap
No-op by default. Bind to show keyboard, send Escape/Tab, or run a custom shortcut.
Double-tap
Paste from clipboard.
Triple-tap
No-op by default. Bind to paste, send Escape/Tab, or a custom shortcut.
Swipe
Switch tmux window, Zellij tab, or Herdr tab. Can switch Moshi sessions instead.
Two-finger swipe
Switch multiplexer pane — focus the next or previous pane in tmux, Herdr, or Zellij.
Two-finger vertical swipe
Switch tmux session or Herdr workspace.
Pinch
Adjust terminal font size. Can zoom the tmux pane instead.
Scroll past bottom
Dismiss the keyboard.

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:

Soft drag down
Open the session switcher.
Hard drag down
Minimize the session back to the home screen.

Toolbar gestures

The same toolbar button can do multiple things based on how you touch it. Examples of the actions available:

Keyboard button: tap
Toggle the software keyboard.
Keyboard button: long-press
Open Speech settings or trigger a custom shortcut.
Mic button: long-press
Push-to-talk dictation.
Ctrl button: double-tap
Lock Ctrl on for the next keystrokes.
Shortcuts button: double-tap
Lock the shortcuts panel open.

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.