3 KiB
keys.srf reference
keys.srf rebinds the interactive TUI's keys. zfin reads it from
~/.config/zfin/keys.srf. When the file is absent, built-in defaults
apply; when present, it is the sole source of bindings.
Generate a fully-commented starting file from the current defaults:
zfin interactive --default-keys > ~/.config/zfin/keys.srf
File format
One binding per line:
action::ACTION_NAME,key::KEY_STRING[,scope::SCOPE]
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | The action to bind. Global actions are listed below; a tab-local scope changes which names are valid. |
key |
string | Yes | The key combination, e.g. q, ctrl+c, F5, page_down. |
scope |
string | No | Omitted or global for a global binding; a tab name (e.g. options) for a tab-local one. |
- Modifiers:
ctrl+,alt+,shift+(e.g.ctrl+c). - Special keys:
tab,enter,escape,space,backspace,left,right,up,down,page_up,page_down,home,end,F1-F12,insert,delete. - Multiple bindings: repeat the action on several lines to bind more than one key to it.
scope(optional): omitted orscope::globalis a global binding;scope::<tab>(e.g.scope::options) is a tab-local binding whoseaction::then names that tab's local action.
A tab-local binding may not reuse a globally-bound key; zfin refuses to start if you create that conflict.
A binding whose scope names no tab, or whose action isn't one of
that tab's actions, never fires. It also doesn't fall back to the
tab's default binding, because any override for a tab replaces all of
its defaults. zfin prints a warning for each one when the TUI starts,
and zfin doctor reports them with line numbers.
Default global bindings
action::quit,key::q
action::quit,key::ctrl+c
action::refresh,key::r
action::refresh,key::F5
action::prev_tab,key::h
action::prev_tab,key::left
action::prev_tab,key::shift+tab
action::next_tab,key::l
action::next_tab,key::right
action::next_tab,key::tab
action::tab_1,key::1
action::tab_2,key::2
...
action::scroll_down,key::ctrl+d
action::scroll_up,key::ctrl+u
action::scroll_top,key::g
action::scroll_bottom,key::G
action::page_down,key::page_down
action::page_up,key::page_up
action::select_next,key::j
action::select_next,key::down
action::select_prev,key::k
Run zfin interactive --default-keys for the complete, current list
(including tab-scoped actions), each line ready to edit.
See also
- Customize the TUI -- the walkthrough.
- The interactive TUI -- tabs, actions, and the help overlay.
theme.srf-- recolor the interface.