Keybinds
Keybinds
Keybinds are configured in the config file. There are different keybinds for different panes and actions. Keybinds are optional and do not have be specified in the config file. If ommited the default keybinds below are used. By default the keybinds are vim-like, but you can change them to whatever you want.
keybinds_map
Is a simple list of key-value pairs where the left side is key to use specified as a string and the right side is a name of the action. You can also bind multiple keys to a single action by specfying it multiple times with a different key.
Keybind syntax
Keybind syntax is similar to vim keybinds. To map action to letter a
you write a
and to map an action to an uppercase A
you would write A
. To combine a
key with a modifiers like Ctrl
you would write <C-a>
and likewise for an uppercase
A
: <C-A>
. If a special key like Tab
is used on its own you have to wrap it angle brackets like so: <Tab>
.
ExternalCommand
ExternalCommand(command: ["/path/to/my/script.sh", "arg1", "arg2"], description: "Description to show in Help modal.")
Can be used to bind any script/shell command to a key. This command gets info about MPD’s and rmpc’s state as environment variables. All song paths are listed as their path relative to MPD’s music directory.
Environment
$CURRENT_SONG
: can be used to access the currently playing song.$STATE
: Can be one ofPlaying
,Paused
orStopped
$SELECTED_SONGS
: contains a list of songs that are selected in the various panes. Songs are separated by\n
, their order is undefined and should not be relied upon.- In
Browser
,Albums
,Playlists
andArtists
it will list all songs contained in the currently highlighted item and all its subdirectories. If the item is a single song, only that one song will be present. If you mark multiple directories/songs, all of them will be listed in$SELECTED_SONGS
. - In
Queue
, only the song under cursor will be listed. - In
Search
, While on the search stage, all the songs will be listed and while on the song list stage, only the song under cursor or all marked songs will be listed.
- In
Default keybinds
Below you can find list of all the possible actions along with a short description and their default values.
Global
These keybinds work everywhere (except when a modal is active) and are used to control things like playback, navigation between different tabs and exiting rmpc.
Default Key | Action | Info |
---|---|---|
q | Quit | Exit rmpc |
~ | ShowHelp | Show help modal with the current keybinds and their description |
: | CommandMode | Enter command mode. Commands that can be used are the same as in the CLI |
ExternalCommand | Special keybind that allows you to bind external commands to a key. Check ExternalCommand for more info. | |
q | ShowHelp | Show keybinds modal |
I | ShowCurrentSongInfo | Show metadata of the currently playing song in a modal popup |
O | ShowOutputs | Show MPD outputs config modal |
P | ShowDecoders | Show MPD decoder plugins in a modal popup |
z | ToggleRepeat | Toggle repeat |
x | ToggleRandom | Toggles random |
c | ToggleConsume | Remove song from the queue after playing |
v | ToggleSingle | Whether to stop playing after single track or repeat track/playlist when repeat is on |
p | TogglePause | Pause/Unpause playback |
s | Stop | Stop playback |
. | VolumeUp | Raise volume |
, | VolumeDown | Lower volume |
f | SeekForward | Seek currently playing track forwards |
b | SeekBack | Seek currently playing track backwards |
> | NextTrack | Play next track in the queue |
< | PreviousTrack | Play previous track in the queue |
Right / Tab | NextTab | Switch to next tab |
Left / <S-Tab> | PreviousTab | Switch to previous tab |
1 | SwitchToTab(“Queue”) | Switch directly to Queue tab |
2 | SwitchToTab(“Directories”) | Switch directly to Directories tab |
3 | SwitchToTab(“Artists”) | Switch directly to Artists tab |
4 | SwitchToTab(“Album”) | Switch directly to Albums tab |
5 | SwitchToTab(“Playlists”) | Switch directly to Playlists tab |
6 | SwitchToTab(“Search”) | Switch directly to Search tab |
Navigation
These keybinds are used to navigate the different tabs and to interact with the items on the screen. Also includes some more advanced ones like moving the cursor up or down half a page, moving the cursor to the top or bottom of the list and controlling search mode.
Default Key | Action | Info |
---|---|---|
<C-c> / Esc | Close | Close/Stop whatever action is currently going on. Cancel filter, close a modal, etc. |
k | Up | Up |
l | Right | Right |
<Space> | Select | Mark current item as selected in the browser, useful for example when you want to add multiple songs to a playlist |
<C-Space> | InvertSelection | Inverts the current selected items |
Enter | Confirm | Confirm whatever action is currently going on. In browser panes it either enters a directory or adds and plays a song under cursor |
K | MoveUp | Move current item up, for example song in a queue |
J | MoveDown | Move current item down, for example song in a queue |
g | Top | Jump all the way to the top |
G | Bottom | Jump all the way to the bottom |
<C-n> | NextResult | When a filter is active, jump to the next result |
N | PreviousResult | When a filter is active, jump to the previous result |
j | Down | Down |
D | Delete | Delete. For example a playlist, song from a playlist or wipe the current queue. |
<C-u> | UpHalf | Jump by half a screen up |
<C-d> | DownHalf | Jump by half a screen down |
i | FocusInput | Focuses textbox if any is on the screen and is not focused |
/ | EnterSearch | Enter search mode |
h | Left | Left |
r | Rename | Rename. Currently only for playlists |
a | Add | Add item to queue |
A | AddAll | Add all items to queue |
Queue
Keybinds specific to the queue pane.
Default Key | Action | Info |
---|---|---|
<C-s> | Save | Save current queue as a new playlist |
D | DeleteAll | Clear current queue |
Enter | Play | Play song under cursor |
a | AddToPlaylist | Add song under cursor to an existing playlist |
d | Delete | Remove song under curor from the queue |
i | ShowInfo | Show metadata of the song under cursor in a modal popup |
C | JumpToCurrent | Moves the cursor in Queue table to the currently playing song |