Add help overlay: titlebar ? button, F1 hotkey, shortcuts and tips
This commit is contained in:
parent
3cdd485627
commit
b35a5b282d
4 changed files with 341 additions and 0 deletions
111
src/lib/shortcuts.ts
Normal file
111
src/lib/shortcuts.ts
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* 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: "Navigation",
|
||||
items: [
|
||||
{ keys: "Ctrl+K", description: "Open jump-to-pane palette" },
|
||||
{
|
||||
keys: "Ctrl+Shift+← / → / ↑ / ↓",
|
||||
description: "Focus neighbour pane in that direction",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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",
|
||||
body: "Grab a pane's title bar and drag it onto another pane to swap their tree positions. Useful for reorganizing without keyboard.",
|
||||
},
|
||||
{
|
||||
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.",
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue