mpv icon
Windows · Linux · macOS · FreeBSD · Free
mpv 0.41
↓ Free Download

How to Configure Mpv Keyboard Shortcuts

Keyboard shortcut customization in mpv happens through the input.conf configuration file, where you map keys to player commands without touching a single menu. Unlike traditional GUI players, this lightweight video player gives you complete control over every keystroke—which means you can build a control scheme that matches your workflow exactly.

Understanding mpv's Input Configuration System

The input.conf file is a plain text file that lives in mpv's configuration directory. On Linux and macOS, that's `~/.config/mpv/`. Windows users find it in `%APPDATA%\mpv\`. Each line in this file follows the format: `key command`, where the key is what you press and the command is what mpv executes.

You don't need to create the file from scratch. Running mpv once generates a default configuration folder. Open input.conf in any text editor—Notepad, VS Code, whatever—and you're ready to customize. The default file already contains commented-out examples showing the standard bindings, so you can see what commands are available.

Setting Up Your First Custom Shortcuts

Start by identifying what you want to change. The most common customizations involve playback control, seeking, and volume adjustment. Here's the syntax for a few practical examples:

`j seek -10` makes the J key jump backward 10 seconds. `l seek 10` does the opposite. `< multiply speed 0.9` slows playback by 10%, and `> multiply speed 1.1` speeds it up. Notice that single characters work, but so do modifier combinations: `ctrl+q quit`, `shift+Right seek 30`, `alt+j cycle sub`.

Adding these to input.conf means restarting the player to activate them. Changes take effect immediately on restart—no reload command needed.

How to Configure mpv Keyboard Shortcuts for Advanced Workflows

Once the basics are in place, you can layer in more complex bindings. Cycling subtitles, toggling filters, and controlling playback position all work through the same input.conf mechanism. For example, `s cycle sub` cycles through available subtitle streams, while `a cycle sub-delay +0.1` shifts subtitle timing forward by 100 milliseconds.

For those working with an open source media player across multiple machines, synchronizing input.conf across devices saves repetition. Copy the file to your config folder on any platform—Windows 10, Linux Ubuntu, macOS, or FreeBSD—and the same shortcuts work everywhere.

Pro Tip: Bind a rarely-used key to `show-text "${playlist-pos}/${playlist-count}"` to display your current position in a playlist on screen. This command reveals real-time information without cluttering your UI.

Managing Complex Key Bindings and Conflicts

Avoid mapping keys that mpv's default bindings already use unless you intentionally want to override them. The commented sections in input.conf document which keys are reserved. If you bind a key to multiple commands, the last definition wins—earlier entries are overwritten.

Comments in input.conf start with `#`. Use them liberally: `# Volume control - custom scheme` helps you remember why a binding exists months later. This matters when you learn advanced command-line techniques that reference your custom keybindings.

Comparing Performance: Why Keyboard Control Matters

mpv beats VLC for responsive keyboard input because it skips GUI overhead entirely. Every keystroke maps directly to a command with near-zero latency. This is especially noticeable when seeking through long files or adjusting playback speed on-the-fly.

Practical Examples for Different Workflows

Video editors often need frame-by-frame stepping: `Right frame-step` and `Left frame-back-step` handle this. Anime watchers benefit from `k add chapter -1` and `j add chapter 1` to skip between opening and closing credits. Explore command-line video player features to discover what workflows are possible.

For detailed setup across different operating systems, install mpv on your platform first, then paste your input.conf into the config directory. Once you've mastered how to configure mpv keyboard shortcuts, you'll never want to use keyboard shortcuts the old way again.