/** * Single source of truth for the keyboard shortcuts and inline tips shown * in the help overlay. README has a hand-maintained shortcut table that * mirrors this — keep them in sync until/unless we generate one from the * other. */ export interface ShortcutSpec { /** Display string for the key combo, e.g. "Ctrl+Shift+E". */ keys: string; description: string; } export interface ShortcutSection { title: string; items: ShortcutSpec[]; } export const SHORTCUT_SECTIONS: ShortcutSection[] = [ { title: "Layout", items: [ { keys: "Ctrl+Shift+E", description: "Split active pane to the right" }, { keys: "Ctrl+Shift+O", description: "Split active pane downward" }, { keys: "Ctrl+Shift+W", description: "Close active pane" }, { keys: "Ctrl+Shift+P", description: "Promote active pane out one level (turns a nested pane into a full row/column; self-inverse)", }, ], }, { title: "Tabs", items: [ { keys: "Ctrl+T", description: "New tab (blank workspace, one pane)" }, { keys: "Ctrl+Shift+T", description: "Close current tab (confirms when the tab has live panes)", }, { keys: "Ctrl+PageDown / Ctrl+PageUp", description: "Switch to next / previous tab", }, { keys: "Ctrl+1 … Ctrl+9", description: "Switch to tab 1 … 9" }, ], }, { title: "Multi-window", items: [ { keys: "Right-click pane toolbar → Move to new window", description: "Pop the active pane into a fresh tiletopia window (PTY survives the move; scrollback ring replays)", }, { keys: "Drag pane toolbar past the window edge", description: "Same as the right-click action — release the drag well outside the window to detach into a new window", }, ], }, { title: "Navigation", items: [ { keys: "Ctrl+K", description: "Open jump-to-pane palette" }, { keys: "Ctrl+Shift+← / → / ↑ / ↓", description: "Focus neighbour pane in that direction (window-level — works even when no terminal is focused)", }, { keys: "Ctrl+Alt+← / → / ↑ / ↓", description: "Focus neighbour pane in that direction (from inside the terminal — intercepted before the PTY sees it)", }, { keys: "Ctrl+Alt+H / J / K / L", description: "Same as Ctrl+Alt+Arrow but in Vim-style HJKL order (left / down / up / right)", }, { keys: "Alt+1 … Alt+9", description: "Focus the Nth pane in layout order (DFS: left-to-right, top-to-bottom); clamped to pane count. Note: swallows bare Alt+digit — shells using readline digit-argument or vim buffer-jump may conflict.", }, ], }, { title: "Broadcast", items: [ { keys: "Ctrl+Shift+B", description: "Toggle broadcast on active pane" }, { keys: "Ctrl+Shift+Alt+B", description: "Toggle broadcast on ALL panes (same as titlebar 📡)", }, ], }, { title: "Font size", items: [ { keys: "Ctrl+= / Ctrl+- / Ctrl+0", description: "Zoom active pane in / out / reset", }, { keys: "Ctrl+Shift+= / Ctrl+Shift+- / Ctrl+Shift+0", description: "Same, applied to every pane", }, ], }, { title: "Terminal", items: [ { keys: "Ctrl+Shift+C / Ctrl+Shift+V", description: "Copy selection / paste in terminal", }, { keys: "Ctrl+Shift+F", description: "Open find-in-scrollback bar for the focused pane", }, { keys: "Enter / Shift+Enter", description: "Next / previous match (while search bar is focused)", }, { keys: "Escape", description: "Close find bar and return focus to terminal", }, ], }, { title: "Panels", items: [ { keys: "Ctrl+Shift+U", description: "Open the usage panel — per-session claude token counts + estimated cost for the open WSL panes", }, ], }, { title: "Help", items: [{ keys: "F1", description: "Show this help overlay" }], }, ]; export interface TipSpec { title: string; body: string; } export const TIPS: TipSpec[] = [ { title: "Per-pane shell picker", body: "Click the distro chip in any pane's toolbar to switch between WSL distros, PowerShell, or a saved SSH host. The pane respawns with the new shell.", }, { title: "SSH host manager", body: "Titlebar 🔑 SSH hosts opens the manager. Add hostname / user / port / identity file / jump host / extra ssh args. Saved hosts appear in every pane's dropdown.", }, { title: "Saved passwords", body: "Optionally save a host's password — stored in Windows Credential Manager (DPAPI-encrypted), never written to hosts.json. When ssh prompts on connect it's typed automatically. Hosts with a saved password show 🔒 in the list.", }, { title: "Clickable links", body: "http and https URLs in terminal output get underlined and open in your default browser on click.", }, { title: "Drag pane headers to swap or detach", body: "Grab a pane's title bar and drag onto another pane to swap their tree positions. Drag well outside the window edge (more than ~60px past) and release to detach the pane into a new window — same mechanism as the right-click 'Move to new window' action, PTY stays alive.", }, { title: "Workspace persistence", body: "Layout, labels, distro choices, and SSH hosts auto-save to %APPDATA%/com.megaproxy.tiletopia (debounced 500ms). Closed panes don't come back — only the structure is restored, shells spawn fresh on next launch.", }, { title: "Tabs (workspaces)", body: "Each tab is an independent tile layout — useful for keeping one tab per project. PTYs in non-active tabs keep running (a Claude session in tab A keeps going while you work in tab B). New tab starts with one default-shell pane; close confirms when the tab has live panes. Tabs auto-save to the same workspace.json.", }, { title: "MCP server (let Claude drive the workspace)", body: "Titlebar 🤖 opens the MCP control panel. Start the server, then for Claude Desktop click 'Download .mcpb' and drag the file into Settings → Extensions — zero-config because the bundle reads your bearer token from %APPDATA% at launch (no copy-paste, survives token rotation). For Claude Code (terminal CLI) use the fallback snippet in the panel: it wires npx mcp-remote as a stdio shim because Claude Code's HTTP-MCP client ignores static bearer auth and tries OAuth instead. URL + token persist across restarts; Regenerate the token in the panel if it leaks. Default-deny per pane: toggle 🤖 on each pane's toolbar to expose it to MCP.", }, ];