Custom key bindings
A few custom key bindings are configured during MusicPlayerPlus initialization
with the mppinit
command. These are purely for convenience and can be altered
or removed if desired.
Tmux custom key bindings are defined in $HOME/.tmux.conf
.
MusicPlayerPlus custom key bindings for tmux sessions include the following:
[ Alt-PgDn ]
- Next window[ Shift-Right ]
- Next window[ Alt-PgUp ]
- Previous window[ Shift-Left ]
- Previous window[ Alt-x ]
- Prompt to kill session[ Alt-X ]
- Kill session[ Alt-Left ]
- Move pane focus to left[ Alt-Right ]
- Move pane focus to right[ Alt-Up ]
- Move pane focus up[ Alt-Down ]
- Move pane focus down[ Prefix q ]
- Prompt to kill session[ Prefix Q ]
- Kill session
The tmux prefix key is remapped from Ctrl-b
to Ctrl-a
and the status bar
is configured to display a Ctrl
message when the prefix key is pressed.
The MusicPlayerPlus tmux customization enables tmux mouse mode. The mouse can be used to select and resize tmux panes and windows.
There are hundreds of tmux key bindings. To view the currently configured
tmux key bindings, execute the command tmux list-keys
.
Custom key bindings are also defined for the mpcplus
music player client
command. Mpcplus custom key bindings are defined in
$HOME/.config/mpcplus/bindings
. MusicPlayerPlus custom key bindings for
mpcplus
include the following:
[ Alt-c ]
- Display album cover art for currently playing song[ Alt-f ]
- Open the fuzzy finder to search/select media[ Alt-m ]
- Open the MPD monitor in a terminal window[ Alt-r ]
- Raise/lower the spectrum visualizer window
Tmux session exit issues
In addition to the Alt-x
and Alt-X
key bindings above to kill the current
tmux session, MusicPlayerPlus tmux key bindings include Ctrl-a q
and
Ctrl-a Q
which also are mapped to kill-session
in a similar manner. This
is because some terminal emulators, in particular iTerm2, may already have key
bindings for the Alt
key or the Meta key may be something other than Alt
.
In a MusicPlayerPlus tmux session, if Alt-x
and Alt-X
do not initiate
a kill-session
then use the configured tmux prefix key (e.g. Ctrl-a
)
followed by q
or Q
to exit the current tmux session.
If a MusicPlayerPlus tmux session has been initiated over SSH using the
Terminal app on macOS then it may be necessary to configure the Terminal
profile in use to “Use Option as Meta key” in order to recognize the custom
tmux key bindings using the Alt
key. To configure the Terminal app profile
in this manner, go to Terminal -> Preferences -> Profiles
. Select the
profile you are using (usually “Basic Default”) and select the Keyboard
tab.
Click the “Use Option as Meta key” checkbox and exit Terminal preferences.