diff options
| author | user <user@clank> | 2026-08-15 11:11:11 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-15 11:11:11 +0200 |
| commit | ffd73be0f9fc1d03ed832e5215f9a89f6de1e960 (patch) | |
| tree | a0e88ea63eeb7c8fb4db6a30531c66109ef54bfd /src/expr.c | |
| parent | sl0ppty: colour the states that mean a pane is not live (diff) | |
| download | slosh-ffd73be0f9fc1d03ed832e5215f9a89f6de1e960.tar.gz slosh-ffd73be0f9fc1d03ed832e5215f9a89f6de1e960.tar.xz slosh-ffd73be0f9fc1d03ed832e5215f9a89f6de1e960.zip | |
sl0ppty: C-a ? shows every binding you have
A prefix-key multiplexer is unusable until you know its keys, and the only
place they were written down was a config file and a README. Now they are one
keystroke away, in a pane-shaped modal floating over the layout.
It is built from CFG.binds, not from a list of what the defaults are. Rebind
something and the sheet says what you bound; unbind it (`bind "-" "none"`)
and it stops advertising it; change the prefix and the "C-a then:" line at the
top changes with it. A cheatsheet that can disagree with the keyboard is worse
than no cheatsheet, and it would disagree the first time anybody edited a
config -- so it cannot be a list.
Bindings that share an action are merged onto one row: `h ←` is one thing to
learn, not two, and the nine tab digits are `1…9` rather than nine rows.
Keys are named the way you press them -- `\` and `?` and `H`, not "backslash"
and "S-slash" and "shift+h" -- and both spellings still parse as config, so
the sheet stays copyable.
The frame is a pane's frame, corners and title and close button, because a
dialog should wear the chrome of the program it belongs to. It fills its own
background: a modal you can read a shell prompt through is one nobody trusts.
Two columns when there is room, one when there is not, split at a group
boundary so a heading never ends a column alone, and every string clipped at
the frame -- a small terminal loses words rather than its border.
Any key dismisses it, and that key does nothing else: dismissing a modal must
not also run the thing you happened to press. A click anywhere does the same
and does not reach what it landed on.
`?` is bound twice, to shift+slash and to slash, because whether it arrives
with a modifier depends on the outer terminal: as a plain byte there is no
shift to be had, and under the kitty keyboard protocol -- which our own client
asks for -- there is. Binding one of them is a binding that works on the
machine it was written on.
Diffstat (limited to 'src/expr.c')
0 files changed, 0 insertions, 0 deletions
