Skip to content

Manage Key Bindings

Samuel Beucler edited this page Feb 22, 2024 · 8 revisions

Synonyms: Keybindings


简体中文



IINA provides convenient GUI based on mpv's input.conf system. Please refer to mpv's documentation for detailed information.

UI

Configurations

IINA supports multiple key binding configurations, each of which contains a set of key bindings. You can choose the active configuration from the menu (①). Start from v0.0.8, you can switch between configurations without restarting IINA. If Media keys of your keyboard do not work, for enabling Media keys for IINA you should make this application default: on Panel open IINA => Preferences => Utilities and press Set IINA as the Default Application...

Each configuration is associated with a .conf file in mpv's input.conf format, which will be created and updated by IINA automatically.

Default configurations

IINA is shipped with some default configurations as listed below. Default configurations cannot be deleted or modified, therefore, you must duplicate one of them to modify key bindings.

Name Description
IINA Default A modified configuration based on mpv's default input.conf.
MPV Default MPV's original input.conf.

Creating or duplicating configurations

You can simply duplicate current configuration by clicking "Duplicate" button (②). IINA will prompt you a configuration name. Please try not to include symbols in the name. When finished, IINA will switch to the duplicated configuration and now you are able to add or delete key bindings.

If you prefer creating an empty configuration and want to edit it manually, there's also a "New" button, which will create a .conf file from scratch.

Editing the configuration file

In case of you want to edit the .conf file directly, please follow the following steps:

  1. Click "reveal the config file in Finder" button to locate the file.
  2. Edit the file with your favorite text editor.
  3. Switch to another configuration and switch back to reload the modified file.

Key Bindings

You cannot edit default key bindings. Please make sure you duplicated one of them before editing key bindings.

Basics

Each key binding consists of a Key and an Action. You are free to bind any action to any key, and it's OK to have multiple keys bound to the same action.

In the table, each row shows one key binding, with key and action formatted for readability. You can add a row by clicking the "+" button (③) or delete the current selected row by clicking "-" button (③).

Using the GUI

Add key binding UI

The figure above shows a typical GUI for editing or creating a new key binding.

Press any key or key combination to record the key code. It will be displayed in mpv's format in the gray box (①). For media keys, you need to choose from the drop down menu manually. For Apple Remote keys, there is no way to set them in the GUI currently0.0.10, but you can refer to next section to enter the raw key code.

You can set the action from nested menus and inputs (②) if you are not familiar with mpv command. If the menus cannot satisfy your need, of course, it's also possible to enter mpv commands directly in the text field (③).

For changing various properties like speed, volume, etc., please refer to the following table.

GUI Function Example
Set Set a property to a value. Set Pause to Yes: Pause the video
Cycle Cycle or toggle a property. Cycle Fullscreen: Toggle full screen
Change Increase or decrease a property. Change Audio delay increase 1: Audio delay +1s
Multiply Multiply a property by a factor. Multiply Speed by 1.1: Increase the speed to 1.1x

Editing raw values

If you want to edit the raw key codes and actions directly, just tick the "show raw values" checkbox (④). In this mode, the table will display mpv key codes and actions, and you are able to edit any of them by double clicking a cell.

Key codes for Media Keys and Apple Remote

(WIP)