Docs / Action Bindings and Terminal Commands

Action Bindings and Terminal Commands

Master programmable action bindings, terminal control commands, session navigation, and Pro Admin triggers across Casshper soft keys and touch gestures.

Bridging Touch Interactions to Terminal Control

While standard keyboard inputs send individual ASCII characters or keycodes, Casshper's Action Bindings allow you to trigger deep application lifecycle events, session controls, clipboard operations, and specialized Pro Admin features. Action bindings can be assigned to buttons on any Soft Key Bar or mapped to touch sequences in Custom Gestures.

Binding Types in Casshper: Keycodes vs. Text Macros vs. Action Bindings

Casshper supports three distinct button and gesture binding types:

  • Keycode (KEYCODE): Dispatches preset keycodes and custom ASCII hex keycodes with optional modifier bitmasks (Ctrl, Alt, Shift). Keystrokes such as Escape (Preset Key Esc (⎋) / ASCII Hex 0x1B), Ctrl+C (ASCII Hex 0x43 with the Ctrl modifier enabled), Tab, F1–F12, and arrow keys are configured as KEYCODE bindings—not ACTION bindings. Keycode bindings across both soft keys and touch gestures support operational Key Modes: Press (momentary), Latch (one-shot sticky modifier), and Toggle (persistent lock).
  • Text (TEXT): Injects freeform text strings, shell commands, and multi-character command macros (e.g. git status, :w, clear, docker ps) directly into the terminal standard input buffer without opening the on-screen keyboard. Text is sent directly to the active session.
  • Action (ACTION): Dispatches internal application controller commands to manage UI, sessions, themes, clipboard buffers, and input overlays (such as Toggle Keyboard, Open Navigation Menu, Swap Soft-Key Bar, Cycle Soft-Key Bar, Theme Picker, Set Theme Directly, Sneaky Input, Copy Selection, and Paste Clipboard). Keystrokes and text inputs are not part of the ACTION catalog.

Core Action Bindings

Core action bindings are built directly into Casshper and require no additional license:

Virtual Keyboard Management

  • Toggle Keyboard: Instantly displays or dismisses the Android on-screen software keyboard without losing cursor focus in the active terminal session. Useful when switching between reading logs and typing commands, or when using a hardware keyboard alongside Soft Key Bars.

Session Navigation and Lifecycle

  • Next Session: Switches the active terminal viewport forward to the next running background session tab.
  • Previous Session: Switches the active terminal viewport backward to the previous running session tab.
  • New Session: Spawns a new local Zsh shell session or prompts to connect to a bookmarked host from Saved Connections.
  • Close Session: Safely terminates the active foreground session buffer after confirmation.
  • Toggle Sessions Sidebar: Opens or closes the session drawer sidebar for quick access to all active background sessions and saved host profiles.

Clipboard and Buffer Operations

  • Copy Selection: Copies the active highlighted text selection on the terminal canvas directly into the Android system clipboard.
  • Paste Clipboard: Injects the current Android clipboard contents into the terminal input buffer in a single atomic byte stream, avoiding slow character-by-character typing.

Pro Admin Action Bindings

Pro Admin action bindings unlock advanced workflow orchestration, contextual theme switching, and dynamic toolbar swapping:

Sneaky Input Scratchpad

The Sneaky Input action opens the floating multiline text staging overlay. This allows you to compose complex commands, paste large snippets, or use Gboard swipe typing and voice dictation without terminal escape character interference or dropped keystrokes.

Detailed guide: Sneaky Input Documentation.

Theme Picker and Direct Theme Switching

Pro Admin enables on-the-fly contextual color adjustments:

  • Theme Picker: Opens the in-session color theme selector modal, allowing you to switch between 450+ bundled Ghostty palettes in real time.
  • Direct Theme Triggers: Assign specific theme palettes (e.g. Solarized Red for production, Tokyo Night for staging) directly to soft keys or touch gestures for instant visual isolation.

Explore server risk management in Production Server Safety and per-session styling in Contextual Themes.

Dynamic Soft-Key Bar Swapping and Cycling

When working across different tools (like Git, tmux, or Neovim), you can organize your soft keys into multiple dedicated toolbars:

  • Swap Soft-Key Bar: Instantly transitions the active toolbar to a specified target bar layout (for example, switching from your Default Navigation Bar to a tmux Multiplexer Bar).
  • Cycle Soft-Key Bar: Cycles forward through all your configured soft-key bars in sequence.

Learn how to configure multi-bar layouts in Multi-Soft Key Bars.

Complete Action Bindings Reference

Action NameTierSupported InTarget Feature Documentation
Toggle KeyboardCoreSoft Keys and GesturesSoft Key Bars
Next SessionCoreSoft Keys and GesturesSession Persistence
Previous SessionCoreSoft Keys and GesturesSession Persistence
New SessionCoreSoft Keys and GesturesSaved Connections
Close SessionCoreSoft Keys and GesturesSession Persistence
Toggle Sessions SidebarCoreSoft Keys and GesturesSession Persistence
Copy SelectionCoreSoft Keys and GesturesGhostty Engine
Paste ClipboardCoreSoft Keys and GesturesGhostty Engine
Sneaky InputPro AdminSoft Keys and GesturesSneaky Input
Theme PickerPro AdminSoft Keys and GesturesContextual Themes
Set Theme DirectlyPro AdminSoft Keys and GesturesContextual Themes
Swap Soft-Key BarPro AdminSoft Keys and GesturesMulti-Soft Key Bars
Cycle Soft-Key BarPro AdminSoft Keys and GesturesMulti-Soft Key Bars

Configuring Action Bindings

On Soft Key Bars

  1. Navigate to Settings → Soft Key Bars and tap on the key button you wish to customize.
  2. In the Key Editor, change the Binding Type to Action.
  3. Select your target action from the dropdown list (e.g. Toggle Keyboard, Next Session, Sneaky Input, or Swap Soft-Key Bar).
  4. Assign your desired button label and icon (supports UTF-8 text and symbols like , 📋, 🎨, ).
  5. Tap Save Key, then tap Save Settings to apply immediately.

On Touch Gestures (Pro Admin)

  1. Navigate to Settings → Touch Gestures and tap + New Gesture.
  2. Record your tap and swipe motion sequence on the interactive recorder.
  3. Select your desired action command from the action catalog.
  4. (Optional) Toggle Immediate Execution (⚡) for zero-latency execution.
  5. Tap Save Gesture, then tap Save Settings.
Pro Tip: Action Synergy

Pair action bindings together across soft keys and gestures. For example, use a double-tap gesture to toggle your software keyboard, a dedicated soft key button to open Sneaky Input, and a latched soft key to trigger Contextual Themes when connecting to critical production infrastructure.