# Commands
`:` opens a command line on the bottom row. `:help` shows this list inside playr.
A command works in every view, or only in the view named by its heading. Typed in another view, it is refused with the view it belongs to. The key column gives the default key for the same action. `:map` and `:unmap` change keys until playr exits; [`settings.toml`](../README.md#configuration) changes them for good.
## Arguments
- `TIME` is seconds, `m:ss` or `h:mm:ss`, as in `90`, `1:23`, `1:02:03`.
- A leading `+` or `-` makes a number relative: `:seek +10`, `:volume -5`, `:speed +1`. Without a sign it is absolute.
- `NAME` and `QUERY` run to the end of the line, so spaces need no quotes.
- `[ ]` marks an optional argument. Without it, `:search`, `:save` and `:rename` open their prompt.
## Every view
| `:help` | | list these commands |
| `:keys` | `?` | list the keys |
| `:quit` | `q` | quit |
| `:view VIEW` | `1` `2` `3` | library, selection or playlists |
| `:next-view` | `tab` | switch to the next view |
| `:down [N]` | `j`, down, page down | move the cursor down N rows, default 1 |
| `:up [N]` | `k`, up, page up | move the cursor up N rows, default 1 |
| `:first` | `g`, home | move the cursor to the first row |
| `:last` | `G`, end | move the cursor to the last row |
| `:play` | `enter` | play the list in view from the cursor |
| `:search [QUERY]` | `/` | search the library; no query opens / |
| `:playlist NAME` | | play a saved playlist |
| `:save [NAME]` | `s` | save the selection as a playlist |
| `:pause` | `space` | play or pause |
| `:next` | `n` | next track |
| `:prev` | `p` | previous track |
| `:stop` | `x` | stop |
| `:seek TIME \| +TIME \| -TIME` | left, right, with shift | seek to a time, or by one: 1:23, +10 |
| `:volume PERCENT \| +N \| -N` | `+` `-` | set the volume, or change it: 60, +10 |
| `:speed N \| +N \| -N` | `[` `]` `\` | set varispeed in semitones, or change it |
| `:mode MODE \| + \| -` | `m` `M` | normal, shuffle, repeat, repeat-one; or cycle |
| `:mark [TIME]` | `b` | mark the playing position, or a time |
| `:unmark` | `B` | undo the last mark |
| `:delmarks` | `C` | clear all marks in this track; asks y/n |
| `:next-mark` | `.` | seek to the next mark |
| `:prev-mark` | `,` | seek to the previous mark |
| `:map [VIEW] KEY COMMAND` | | bind a key, in one view or in all |
| `:unmap [VIEW] KEY` | | remove a key binding |
## Library
| `:toggle` | `a` | select or unselect the track |
| `:clear-search` | `esc` | show the whole library again |
## Selection
| `:remove` | `d` | remove the track from the selection |
| `:move +N \| -N` | `J` `K`, shift up, down | move the track N places |
| `:clear` | `c` | empty the selection; asks y/n |
## Playlists
| `:add` | `a` | add the playlist's tracks to the selection |
| `:delete` | `d` | delete the playlist; asks y/n |
| `:rename [NAME]` | `r` | rename the playlist |
## Typing commands
- A command, mode or view can be shortened to a prefix that names only one of those usable in the current view: `:vol 60`, `:mode shuf`.
- Tab completes command names usable in the current view, then the argument of `:mode`, `:view`, `:playlist` and `:rename`. Repeated Tab cycles through the matches; shift-Tab goes back.
- Up recalls earlier lines that start with the typed text; down returns towards it. The history holds 100 lines and lasts until playr exits.
- Enter runs the line, `esc` cancels, and backspace on an empty line closes the prompt.