Skip to content

Cursor and Mouse

How Otty styles the text cursor and handles mouse / pointer input. Everything here is configured in the GUI — no config file needed.

Cursor style

Settings → Appearance → Cursor controls how the text caret looks.

cursor-style

SettingOptionsNotes
Cursor StyleBlock · Block (hollow) · Bar · UnderlineThe shape drawn at the prompt.
Cursor BlinkDefault · On · OffDefault defers to the program (DEC mode 12) — most shells leave it blinking.
Cursor AnimationOff · SmoothSmooth glides the caret on same-row moves and adds a small overshoot on click / focus.

Programs can override the style at runtime via DECSCUSR (CSI <n> SP q) — a TUI that wants a bar caret in insert mode (Vim, Neovim) gets it regardless of your default.

Cursor color

The cursor body and the glyph under it are theme colors, set in Settings → Appearance → Theme: click the Cursor element to pick the body color, and Text color under cursor for the character it sits on. Leave either at Default to follow the foreground / background automatically.

Mouse

Mouse features can be configured in Settings → Controls → Mouse:

mouse-option

SettingWhat it does
Mouse Over to FocusFocus the pane under the pointer automatically, without clicking.
Mouse hover to focus: On
Right-Click ActionWhat right-click does in the viewport — Context Menu · Copy · Paste · Copy or Paste · Ignore. +right-click always opens the menu.
Right-Click Action: Context Menu
Hide Mouse When TypingHide the pointer while the keyboard is in use; it reappears on the next mouse move.
Hide When Typing: On
Hide When Typing: Off
Cursor Click-to-MoveClick in the prompt to move the shell cursor there — Otty sends the right number of arrow keys, even across soft-wrapped rows.
Cursor Click-to-Move: On

Mouse reporting

When Allow Mouse Capture (Settings → Controls → Mouse) is on and a program turns on reporting — vim, htop, tmux — clicks, drags, and the wheel go to the program instead of Otty's selection.

Otty reports the event set a program asks for. Each tracking mode (enabled via DECSET) adds to the one before it:

ModeAddsEvents delivered
Normal (?1000)button trackingPress and release of the left / middle / right buttons, plus the scroll wheel.
Button-event (?1002)drag trackingThe above, plus motion while a button is held (drag) — one report per cell the pointer crosses.
Any-event (?1003)motion trackingThe above, plus bare motion with no button pressed.

Every report carries the live modifier state — Shift, Option (Meta), Control. Coordinates are encoded in SGR form (?1006, CSI < b ; col ; row M/m), so columns and rows beyond 223 report correctly. Drag and motion are de-duplicated at cell boundaries, matching xterm / Ghostty.

To grab a native selection without leaving the program, turn on Allow Shift with Mouse Click and hold while you drag — the gesture bypasses mouse capture for that one selection.

Mouse cursor shape (OSC 22)

Full-screen TUIs (yazi, btop, mc, ranger) tell Otty what pointer to show over the pane via OSC 22 — pointer over clickable buttons, crosshair over selectable cells, no-entry over read-only regions. Otty maps the standard CSS cursor names to the closest native pointer. Programs reset the shape with \e]22;default\e\\ (or just exit).

See also

  • Selection — native text selection and clipboard.
  • Scroll — scrollback and scroll keys.
  • Input — kitty keyboard protocol, modifiers.

Otty