diff options
| author | Peter Geissler <peter@haxx.in> | 2026-09-02 11:55:35 +0200 |
|---|---|---|
| committer | Peter Geissler <peter@haxx.in> | 2026-09-02 11:55:35 +0200 |
| commit | 93e8b6a98de3f9e8f3176199e7974f4bc8a66a1f (patch) | |
| tree | 08ac7f10722b6f324febd1b8ea3d06f371b5ccb9 /docs/keys.md | |
| parent | web: the hero button says try it, like the section it goes to (diff) | |
| download | slosh-93e8b6a98de3f9e8f3176199e7974f4bc8a66a1f.tar.gz slosh-93e8b6a98de3f9e8f3176199e7974f4bc8a66a1f.tar.xz slosh-93e8b6a98de3f9e8f3176199e7974f4bc8a66a1f.zip | |
docs: big overhaul
Diffstat (limited to 'docs/keys.md')
| -rw-r--r-- | docs/keys.md | 153 |
1 files changed, 72 insertions, 81 deletions
diff --git a/docs/keys.md b/docs/keys.md index 84422d1..cee8862 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -3,48 +3,43 @@ Everything is the **leader** (`C-a` by default) and then a key. Pressing the leader twice sends it to the program in the pane. -`C-a ?` shows a cheatsheet built from the bindings your config actually has, so -it cannot disagree with your keyboard. `C-a p` opens the same list as a palette -you can type into. - -On a terminal too short for the whole sheet it shows what fits and says how much -it did not (`+7 more, in docs/keys.md`), which is the table below. +`C-a ?` shows a cheatsheet built from the bindings your config actually has. `C-a p` opens the same list as a palette you can type into. ## Defaults -| key | does | -|---|---| -| `Enter` | split whichever way there is more room: across the longer side, and the other axis if that will not fit | -| `\` `-` | split into columns / rows, when you mean one | -| `h` `j` `k` `l`, or arrows | move focus | -| `o` | the next pane | -| `H` `J` `K` `L`, or shift+arrows | move the boundary between panes, or the pane itself when it is [floating](panes.md#floating-a-pane) | -| `0` | give every visible pane an even share | -| `Space` | turn the layout a quarter turn (four brings it back) | -| `z` | zoom this pane to fill the tab, and back | -| `m` | minimise it into the strip along the bottom | -| `f` | [float](panes.md#floating-a-pane) it above the layout, and back | -| `F` | a new floating shell, the throwaway terminal | -| `=` (`+`) `-` | grow / shrink a focused float about its centre (`-` splits, when the pane is tiled) | -| `x` | close this pane | -| `X` | close this tab, and everything in it | -| `r` | run a finished pane's command again | -| `P` | set this pane's [purpose](layouts.md#purposes) | -| `>` `<` | push this pane to the next / previous tab (a toast says where it went) | -| `b` | break this pane out into a tab of its own | -| `c` | new tab | -| `Tab` `shift+Tab` | next / previous tab | -| `1`…`9` | go to that tab | -| `s` | search: find a pane by name | -| `w` | the projects picker: every project under your roots, open or not ([workspaces](workspaces.md)) | -| `W` | write this tab out as this project's layout ([workspaces](workspaces.md)) | -| `p` | the command palette | -| `PgUp` `PgDn` `Home` `End` | [scrollback](config.md#scrollback) (the wheel works too) | -| `e` | edit the config, in a pane | -| `?` | this list | -| `d` | detach, leave it running | -| `q` | quit the session | -| `C-a` | send a literal `C-a` | +| key | does | +| -------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `Enter` | split whichever way there is more room: across the longer side, and the other axis if that will not fit | +| `\` `-` | split into columns / rows, when you mean one | +| `h` `j` `k` `l`, or arrows | move focus | +| `o` | the next pane | +| `H` `J` `K` `L`, or shift+arrows | move the boundary between panes, or the pane itself when it is [floating](panes.md#floating-a-pane) | +| `0` | give every visible pane an even share | +| `Space` | turn the layout a quarter turn | +| `z` | (un)zoom this pane | +| `m` | minimize pane to bar in the bottom | +| `f` | [float](panes.md#floating-a-pane) it above the layout, and back | +| `F` | a new floating shell, the throwaway terminal | +| `=` (`+`) `-` | grow / shrink a focused float about its centre (`-` splits, when the pane is tiled) | +| `x` | close this pane | +| `X` | close this tab, and everything in it | +| `r` | run a finished pane's command again | +| `P` | set this pane's [purpose](layouts.md#purposes) | +| `>` `<` | push this pane to the next / previous tab (a toast says where it went) | +| `b` | break this pane out into a tab of its own | +| `c` | new tab | +| `Tab` `shift+Tab` | next / previous tab | +| `1`…`9` | go to that tab | +| `s` | search: find a pane by name | +| `w` | the projects picker: every project under your roots, open or not ([workspaces](workspaces.md)) | +| `W` | write this tab out as this project's layout ([workspaces](workspaces.md)) | +| `p` | the command palette | +| `PgUp` `PgDn` `Home` `End` | [scrollback](config.md#scrollback) (the wheel works too) | +| `e` | edit the config, in a pane | +| `?` | this list | +| `d` | detach, leave it running | +| `q` | quit the session | +| `C-a` | send a literal `C-a` | **`x`/`X`, `p`/`P`, `w`/`W` and `f`/`F` are deliberately shifted pairs on one letter.** Close this pane / close this tab; run a command / tag this pane; go @@ -52,23 +47,15 @@ to a project / write this project down; float this pane / float a fresh one. The shifted half is the same verb on a bigger thing, so the shift is less to remember than a second letter would have been. -`X` says how many panes went with the tab, since most of them were not the one you -were looking at. On the **last** tab it refuses and points at `q` instead: a key -that closes a tab four times and ends your session the fifth is one you cannot -press without counting first. - ## Rebinding -`C-a` is a default, not a decision. If you want it back for start-of-line (and -plenty of people do), one line takes it: +`C-a` is the default leader key, but if you want it back for start-of-line (and +plenty of people do), it's easy to reconfigure: ```kdl keys { prefix "ctrl+b" } // or ctrl+space, or alt+x, or ... ``` -Everything that names the prefix follows what you bound: the badge in the status -bar, the cheatsheet's `C-a then:` caption, the palette's key column. - A `keys` block **adds to** the defaults rather than replacing them, so binding one key leaves the rest alone. `"none"` takes a binding away: @@ -79,17 +66,43 @@ keys { } ``` -Modifiers are `ctrl+ alt+ shift+ super+`, or the shorthand the cheatsheet -prints: `C-` `M-` `S-`. Named keys are `left right up down enter tab escape -space backspace home end pageup pagedown delete insert backslash minus slash -comma period f1`…`f12`, and the arrows can be written as `←` `→` `↑` `↓` too, +Modifiers are: + +- `ctrl` +- `alt` +- `shift` +- `super` + +Named keys are: + +- `left` +- `right` +- `up` +- `down` +- `enter` +- `tab` +- `escape` +- `space` +- `backspace` +- `home` +- `end` +- `pageup` +- `pagedown` +- `delete` +- `insert` +- `backslash` +- `minus` +- `slash` +- `comma` +- `period` +- `f1..f12` + +the arrows can be written as `←` `→` `↑` `↓` too, so a chord copied off the cheatsheet is a chord you can paste into a config. Anything else is the character you press. That includes the shifted ones, which carry their own shift: `"?"` is `"shift+slash"`, `"H"` is `"shift+h"`, `"|"` is -`"shift+backslash"`. A punctuation binding written that way answers both -encodings, because whether your terminal reports `?` with a shift modifier or as -a bare byte is up to your terminal and not to what you meant. +`"shift+backslash"`. `slosh --check` reads a config and says what it could not honour, one problem per line with a file and a line number. Worth running after editing bindings by @@ -114,29 +127,7 @@ under "without the leader", so the `C-a then:` caption above stays true. ## Every action -Any of these can be bound, and any of them can be run from the palette without +The name in the second half of a `bind` is an **action**. The full list, every action, +its default key, and what it does can be found on the **[actions](actions.md)** page. +Any of them can be bound here, and any of them can be run from the palette without being bound at all. - -| group | actions | -|---|---| -| panes | `split` `split-cols` `split-rows` `close-pane` `rerun` `zoom` `minimize` `float` `new-float` `rotate-layout` `clear-shaders` `pane-to-next-tab` `pane-to-prev-tab` `pane-to-new-tab` `set-purpose` `rename-pane` | -| focus | `focus-left` `focus-right` `focus-up` `focus-down` `focus-next` `finder` | -| size | `resize-left` `resize-right` `resize-up` `resize-down` `equalize` `float-grow` `float-shrink` | -| tabs | `new-tab` `rename-tab` `close-tab` `next-tab` `prev-tab` `select-tab-1` … `select-tab-9` | -| projects | `workspaces` `save-workspace` | -| scroll | `scroll-up` `scroll-down` `scroll-page-up` `scroll-page-down` `scroll-top` `scroll-bottom` | -| session | `palette` `help` `edit-config` `detach` `quit` `literal-prefix` | - -`>` and `<` are the shifted period and comma. A terminal does not report the shift -for punctuation, so `.` and `,` answer to them too: the same deal `/` has with -`?`, and the reason the defaults bind both halves. - -`scroll-up` and `scroll-down` have no default key (the wheel does that job), -which is exactly the case the palette exists for. So does `clear-shaders`, which -undoes whatever the program in a pane painted on it -([shaders](shaders.md#prototyping-in-a-pane)); bind it if you leave -`in_band_shaders` on. - -`workspaces`, `save-workspace` and `set-purpose` are the other way round: all -three are bound by default, to `w`, `W` and `P`, so the palette is a second way -to reach them rather than the only one. |
