|
1 | 1 | # Keybindings Reference |
2 | 2 |
|
3 | | -Hypercube uses consistent vim-style keybindings across all tools. This document provides a complete reference. |
| 3 | +Hypercube uses consistent vim-style keybindings across all tools. This document |
| 4 | +provides a complete reference. |
| 5 | + |
| 6 | +## The 3-tier model |
| 7 | + |
| 8 | +Hypercube spans a host desktop and the `devc` container, and your keystrokes pass |
| 9 | +through several programs at once. To avoid the "keyboard dance," keys follow one |
| 10 | +rule: **one modifier per layer, never overlapping.** You only ever reach for one |
| 11 | +of three things, and they live in different worlds: |
| 12 | + |
| 13 | +| Press | Talks to | Layer | |
| 14 | +|---|---|---| |
| 15 | +| **`Super` + …** | the OS | Hyprland windows & workspaces | |
| 16 | +| **`Ctrl+Space`** then a key | the multiplexer | zellij (inside `devc`): panes, tabs, sessions, agents | |
| 17 | +| **`Space` + …** | the editor | Neovim (LazyVim) | |
| 18 | + |
| 19 | +`Ctrl+Space` is a single **leader**: tap it to enter one mode, then press one key. |
| 20 | +There is no pane-mode vs tab-mode vs resize-mode to juggle. See |
| 21 | +[KEYBINDINGS-PROPOSAL.md](KEYBINDINGS-PROPOSAL.md) for the full rationale |
| 22 | +([#198](https://github.com/binarypie-dev/hypercube/issues/198)). |
| 23 | + |
| 24 | +> zellij owns multiplexing under the `Ctrl+Space` leader and Ghostty is a plain |
| 25 | +> renderer (no terminal leader). Within a tab, `Alt+hjkl` moves between zellij |
| 26 | +> panes; Neovim keeps its own `Ctrl+hjkl` for moving between its splits. The two |
| 27 | +> are intentionally separate — Neovim is the editor layer, zellij the mux layer. |
4 | 28 |
|
5 | 29 | ## Hyprland Window Management |
6 | 30 |
|
@@ -71,49 +95,94 @@ The **Super** key (Windows/Command key) is the main modifier. |
71 | 95 |
|
72 | 96 | ## Ghostty Terminal |
73 | 97 |
|
74 | | -Ghostty uses **Ctrl+A** as the leader key (similar to tmux/screen). |
| 98 | +Ghostty is a plain, chrome-less renderer. **Multiplexing — tabs, splits, |
| 99 | +panes — is owned by zellij** (see the next section), so Ghostty defines no |
| 100 | +terminal leader of its own. Dropping the old `Ctrl+A` prefix also frees it as |
| 101 | +readline "beginning of line" when you run `devc claude` in a plain window. |
75 | 102 |
|
76 | | -### Tabs |
| 103 | +Ghostty keeps just two custom binds (plus its built-in copy/paste and |
| 104 | +scrollback defaults): |
77 | 105 |
|
78 | 106 | | Keybinding | Action | |
79 | 107 | |------------|--------| |
80 | | -| `Ctrl+A, C` | New tab | |
81 | | -| `Ctrl+A, N` | Next tab | |
82 | | -| `Ctrl+A, P` | Previous tab | |
83 | | -| `Ctrl+A, W` | Tab overview | |
| 108 | +| `Ctrl+Shift+N` | New window (for local console work outside the multiplexer) | |
| 109 | +| `Ctrl+Shift+,` | Reload config | |
| 110 | +| `Ctrl+Shift+C` / `V` | Copy / paste (Ghostty default) | |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +## zellij (devcube multiplexer) |
| 115 | + |
| 116 | +Inside `devc`, **zellij** is the terminal multiplexer — it manages your panes, |
| 117 | +tabs, and sessions, and each parallel agent (workmux worktree) is a zellij tab. |
| 118 | + |
| 119 | +The leader is **`Ctrl+Space`**. Tap it to enter **HYPER mode**, then press one |
| 120 | +key. Every key runs its action and returns to Normal, so it reads like a leader |
| 121 | +sequence — `Ctrl+Space |` splits, `Ctrl+Space c` makes a tab. There is only one |
| 122 | +mode to learn. `Esc` / `Enter` leaves HYPER mode. |
84 | 123 |
|
85 | | -### Panes (Splits) |
| 124 | +### Panes |
86 | 125 |
|
87 | 126 | | Keybinding | Action | |
88 | 127 | |------------|--------| |
89 | | -| `Ctrl+A, Shift+\` | Vertical split | |
90 | | -| `Ctrl+A, -` | Horizontal split | |
91 | | -| `Ctrl+A, X` | Close pane | |
92 | | -| `Ctrl+A, Z` | Zoom/unzoom pane | |
93 | | -| `Alt+F` | Toggle fullscreen pane | |
94 | | - |
95 | | -### Pane Navigation (Vim-style) |
| 128 | +| `Ctrl+Space` `\|` | Split right (vertical) | |
| 129 | +| `Ctrl+Space` `-` | Split down (horizontal) | |
| 130 | +| `Ctrl+Space` `n` | New pane | |
| 131 | +| `Ctrl+Space` `x` | Close pane | |
| 132 | +| `Ctrl+Space` `z` | Toggle zoom/fullscreen | |
| 133 | +| `Ctrl+Space` `w` | Toggle floating panes | |
| 134 | +| `Ctrl+Space` `e` | Embed / float pane | |
| 135 | +| `Ctrl+Space` `h/j/k/l` | Move focus | |
| 136 | +| `Ctrl+Space` `H/J/K/L` | Move the pane | |
| 137 | + |
| 138 | +### Tabs (workmux worktrees) |
96 | 139 |
|
97 | 140 | | Keybinding | Action | |
98 | 141 | |------------|--------| |
99 | | -| `Ctrl+A, H` | Focus pane left | |
100 | | -| `Ctrl+A, J` | Focus pane down | |
101 | | -| `Ctrl+A, K` | Focus pane up | |
102 | | -| `Ctrl+A, L` | Focus pane right | |
| 142 | +| `Ctrl+Space` `c` | New tab | |
| 143 | +| `Ctrl+Space` `[` / `]` | Previous / next tab | |
| 144 | +| `Ctrl+Space` `1`–`9` | Jump to tab _n_ | |
| 145 | +| `Ctrl+Space` `,` | Rename tab | |
103 | 146 |
|
104 | | -### Pane Resizing |
| 147 | +### Resize, session, lock |
105 | 148 |
|
106 | 149 | | Keybinding | Action | |
107 | 150 | |------------|--------| |
108 | | -| `Ctrl+A, R` | Enter resize mode | |
109 | | -| Then `H/J/K/L` | Resize in direction | |
| 151 | +| `Ctrl+Space` `r` | Resize sub-mode (then `h/j/k/l` or `+`/`-`; `Esc` exits) | |
| 152 | +| `Ctrl+Space` `s` | Session manager | |
| 153 | +| `Ctrl+Space` `d` | Detach session (leave agents running) | |
| 154 | +| `Ctrl+Space` `q` | Quit — floating prompt: **Save** (resume on next `devc`), **Discard**, or **Cancel** | |
| 155 | +| `Ctrl+Space` `g` | Lock — pass every key to a focused TUI; `Ctrl+Space` again unlocks | |
| 156 | + |
| 157 | +### No leader needed |
110 | 158 |
|
111 | | -### Other |
| 159 | +These work everywhere, no mode required: |
112 | 160 |
|
113 | 161 | | Keybinding | Action | |
114 | 162 | |------------|--------| |
115 | | -| `Ctrl+A, [` | Enter copy mode (vim navigation) | |
116 | | -| `Ctrl+A, Shift+R` | Reload config | |
| 163 | +| `Alt + h/j/k/l` | Move focus (hops between tabs at the edges) | |
| 164 | +| `Alt + =` / `Alt + -` | Grow / shrink pane | |
| 165 | + |
| 166 | +> `Alt+hjkl` moves between zellij **panes**. Inside Neovim, use Neovim's own |
| 167 | +> `Ctrl+hjkl` to move between **its** splits (see the Neovim section); the two |
| 168 | +> navigation layers are kept separate by design. |
| 169 | +
|
| 170 | +--- |
| 171 | + |
| 172 | +## workmux (parallel agents) |
| 173 | + |
| 174 | +[workmux](https://github.com/raine/workmux) orchestrates parallel agents on top of |
| 175 | +zellij: each `workmux add` creates a git worktree and opens it as **its own zellij |
| 176 | +tab** running the agent. So workmux has no separate keybindings — you navigate its |
| 177 | +worktrees with the zellij tab keys above (`Ctrl+Space [` / `]` or `Ctrl+Space 1-9`). |
| 178 | + |
| 179 | +| Command (run in any pane) | Action | |
| 180 | +|---|---| |
| 181 | +| `workmux add <branch> "<prompt>"` | New worktree + zellij tab running the agent | |
| 182 | +| `workmux list` | Show worktrees + agent status | |
| 183 | +| `workmux merge <branch>` | Merge and clean up | |
| 184 | +| `workmux remove <branch>` | Remove without merging | |
| 185 | +| `workmux dashboard` | Live control center (the default `devc` layout) | |
117 | 186 |
|
118 | 187 | --- |
119 | 188 |
|
@@ -196,11 +265,14 @@ Neovim uses LazyVim with **Space** as the leader key. |
196 | 265 |
|
197 | 266 | | Keybinding | Action | |
198 | 267 | |------------|--------| |
199 | | -| `Ctrl+H/J/K/L` | Navigate windows | |
| 268 | +| `Ctrl+H/J/K/L` | Navigate Neovim windows | |
200 | 269 | | `Space w` | Window menu | |
201 | 270 | | `Space -` | Horizontal split | |
202 | 271 | | `Space \|` | Vertical split | |
203 | 272 |
|
| 273 | +> `Ctrl+hjkl` moves between Neovim's own splits; `Alt+hjkl` moves between zellij |
| 274 | +> panes (see the zellij section). They're separate layers by design. |
| 275 | +
|
204 | 276 | ### Buffers |
205 | 277 |
|
206 | 278 | | Keybinding | Action | |
|
0 commit comments