Custom Gestures
Master one-handed mobile terminal control. Chain custom tap and swipe sequences into instant terminal shortcuts.
Fast One-Handed Control for Mobile Terminals
Mobile touchscreens lack physical Function keys, Ctrl keys, and arrow buttons. Hunting through screen toolbars or popping open the software keyboard just to send a single keystroke slows down your workflow. Custom Gestures unlocks touch gesture sequences, allowing you to trigger complex terminal commands, navigation actions, and direct terminal keycodes using fluid tap and swipe movements.
Perform natural touch gesture sequences like double-tapping then swiping left to switch active sessions in under a second, or swiping to send key sequences without touching your keyboard.
Sending Terminal Keys and Action Bindings via Gestures
In addition to navigating UI elements, Casshper gestures can directly dispatch low-level terminal keycodes straight to the active shell, as well as trigger application Action Bindings. This enables completely keyboard-free terminal control:
Ctrl+C(Process Interrupt /SIGINT): DispatchCtrl+Ckeycode sequences directly to the active shell session. Terminate runaway scripts, stoptail -flogs, or cancel command prompts in a fraction of a second with a single gesture, without needing to open the on-screen keyboard or hunt for an on-screen button.Escape(Modal Exit): Send theEscapekeycode directly to running terminal applications. Perfect for instantly exiting Vim/Neovim INSERT mode, cancellingfzffuzzy searches, or clearing interactive CLI prompts without sacrificing vertical viewport space to a permanent Escape key.Paste Clipboard: Inject the current Android clipboard contents directly into the terminal input buffer with zero keystrokes.- Text Selection and Actions: Initiate word and character selection, toggle the keyboard, or switch sessions. See Action Bindings and Terminal Commands for complete details on supported actions.
Immediate Execution Mode (⚡ Zero-Latency Triggers)
By default, Casshper uses a 300ms evaluation timer to detect multi-step gesture combinations (such as distinguishing between a single tap and the beginning of a double-tap sequence). For critical key-sending shortcuts where you want instant response, you can enable Immediate Execution (⚡):
- Standard Mode: The gesture engine waits up to 300ms after the final touch release to verify whether additional taps or swipes follow before resolving the action.
- Immediate Mode (⚡): The engine executes the bound keycode or action immediately upon completing the final touch stroke without waiting for the trailing timeout. This provides instant, zero-latency feedback for time-sensitive shortcuts like interrupts and modal exits.
Operational Key Modes in Touch Gestures (Press, Latch, Toggle)
Touch gestures configured with Keycode (KEYCODE) bindings support all three tactile operational key modes, bridging touch motions directly into sticky and modal keyboard states:
- Press (Momentary): Dispatches the keycode and its modifiers immediately upon gesture recognition. This is standard for quick triggers like
Escape,Return, orCtrl+C. - Latch (One-Shot / Sticky Modifier): Arms a modifier or key sequence for the very next keystroke typed on your keyboard or soft-key bar. For example, assign a gesture to latch
CtrlorCtrl+B(tmux prefix). Swiping arms the modifier; typing your next key consumes the armed state and automatically dispatches the combination. - Toggle (Persistent Switch): Toggles the modifier key (such as
Ctrl,Alt, orShift) continuously locked on until you execute the gesture a second time or tap to clear it. Ideal for prolonged selection or navigation modes without physical modifier keys.
In the gesture list, non-momentary gestures are clearly labeled with a badge suffix such as (Latch) or (Toggle) (e.g. Ctrl+B (Latch) or Shift (Toggle)) so you always know their operational mode at a glance.
Hardware Modifiers, Chording and Bypass XKB Mode
When mapping a gesture to a keycode, the gesture editor provides fine-grained modifier chording and byte-level control:
- Simultaneous Modifier Bitmasks: Combine any keycode with simultaneous
Ctrl,Alt, andShiftmodifier checkboxes (for example, creating a single gesture that firesCtrl+Shift+ForAlt+Enter). - Raw Bytes and Bypass XKB Mode: Toggle Raw Bytes (Bypass XKB) to stream raw byte values directly to the PTY session, bypassing XKB layout translation. This is crucial for special control sequences and non-standard terminal emulations.
Built-in Gesture Shortcuts
- Tap (
Tap): Direct terminal click and cursor positioning at touch coordinates. - Long Press (
Long Press ⚡): Precision word text selection (Select Word) at the touch point with zero-latency immediate execution. - Tap + Long Press (
Tap + Long Press ⚡): Precision character text selection (Select Character) for fine-grained token extraction with immediate execution. - Double Tap (
Tap + Tap): Toggle the virtual software keyboard on or off instantly. - Double Tap + Swipe Left (
Tap + Tap + Swipe Left): Switch to the previous active session tab. - Double Tap + Swipe Right (
Tap + Tap + Swipe Right): Switch to the next active session tab. - Double Tap + Swipe Up (
Tap + Tap + Swipe Up): Quick-paste clipboard buffer directly into the active shell session. - Triple Tap (
Tap + Tap + Tap): Open the Sneaky Input overlay dialog.
Supported Gesture Bindings Reference
Gestures can trigger low-level hardware keycodes (KEYCODE), freeform text macros (TEXT), or high-level application action bindings (ACTION). While terminal keystrokes like Escape and Ctrl+C are handled via keycode dispatch (or command macros via text), high-level commands like session management, keyboard toggles, and toolbar swapping are handled via action bindings. For a comprehensive catalog of all action triggers and command specifications, see Action Bindings and Terminal Commands.
| Binding Target | Binding Type | Description and Behavior |
|---|---|---|
| Send Ctrl+C (SIGINT) | Keycode (KEYCODE) | Dispatches ASCII Hex 0x43 ('C') with Ctrl modifier flag (which resolves to 0x03 / SIGINT in the Ghostty engine) to terminate foreground jobs, cancel inputs, or stop log tails. |
| Send Escape | Keycode (KEYCODE) | Dispatches the Escape keycode (Preset Key Esc (⎋) / ASCII Hex 0x1B) to exit Vim/Neovim modal insert states or cancel prompts. |
| Paste Clipboard | Action (ACTION) | Pastes active Android clipboard text into the terminal stdin buffer. |
| Copy Selection | Action (ACTION) | Copies selected terminal text into the system clipboard. |
| Toggle Keyboard | Action (ACTION) | Toggles visibility of the Android virtual software keyboard. |
| Previous Session / Next Session | Action (ACTION) | Switches the active terminal viewport to the previous or next running session. |
| New Session / Close Session | Action (ACTION) | Creates a new shell session or closes the active foreground session. |
| Toggle Sessions Sidebar | Action (ACTION) | Opens or closes the sessions drawer sidebar. |
| Select Word / Select Character | Action (ACTION — Gestures Only) | Expands text selection to the word boundary or selects individual characters. |
| Sneaky Input | Action (ACTION — Pro Admin) | Opens the Sneaky Input scratchpad overlay for multiline editing and voice dictation. |
| Theme Picker | Action (ACTION — Pro Admin) | Opens the in-session color theme picker dialog. |
| Swap Soft-Key Bar / Cycle Soft-Key Bar | Action (ACTION — Pro Admin) | Swaps or cycles to a specific Multi-Soft Key Bar layout. |
Configuring Custom Key and Navigation Gestures
- Open Casshper and open the sidebar menu to select Settings.
- Select the Touch Gestures tab.
- Under Custom Touch Gestures, tap + New Gesture (or tap an existing gesture row or edit button to modify it).
- Perform your touch sequence on the interactive Record Touch Gesture pad (combining taps and directional swipes).
- Select your target binding:
- Keycode (
KEYCODE): Configure your keycode using the streamlined editor flow:- Keycode: Select a preset key (e.g.
Esc,Tab,Return,Ctrl,F1–F12) or enter a custom ASCII hex keycode (e.g.0x43for 'C'). - Modifiers: Check any desired modifier bitmasks (
Ctrl,Alt,Shift). - Key Mode: Tap the Key Mode button to cycle between
PRESS,LATCH, andTOGGLE. - Raw Bytes: Optionally toggle Raw Bytes (Bypass XKB) for direct stream injection.
- Keycode: Select a preset key (e.g.
- Text (
TEXT): Enter literal text command snippets (e.g.git status\n). - Action (
ACTION): Pick an application command like Paste Clipboard, Toggle Keyboard, Next Session, Sneaky Input, or Swap Soft-Key Bar.
- Keycode (
- (Optional) Enable Immediate Execution (⚡) if you want zero-delay dispatch on the sequence completion.
- Tap Save Gesture, then tap Save Settings to activate your new shortcut!
Workflow Recipes
Vim / Neovim Modal Switching
Map Tap + Swipe Up to Escape with Immediate Execution enabled. While editing code in Neovim on your phone, a quick upward flick instantly drops you out of INSERT mode into NORMAL mode without having to reach for a toolbar button or open the full keyboard.
Emergency Process Interrupt
Map Tap + Swipe Down to Ctrl+C with Immediate Execution enabled. If a script starts dumping runaway log output or an SSH command hangs, a single swipe downwards immediately kills the process via SIGINT.
One-Shot Latched Multiplexer Prefix
Map Tap + Swipe Right to Ctrl+B (or Ctrl+A for screen) in Latch mode. While working in tmux, a flick to the right arms your multiplexer prefix for the very next keypress. Tap % on your keyboard to split panes horizontally or c to spawn a new window without clumsy chord gymnastics.
Multiplexer and Tool Switching
Pair gestures with Multi-Soft Key Bars by mapping a gesture to Swap Soft-Key Bar or Cycle Soft-Key Bar. You can switch between a general coding key bar and a dedicated tmux and Screen Bar with a single gesture motion.
Combining key sequences, latched modifier gestures, and action bindings with Soft Key Bars and Multi-Soft Key Bars gives you full terminal control with maximum screen area for your code and logs.