'How to make a keybind work unconditionally in mpv?
The keys 9 and 0 are, by default, volume- and volume+, respectively.
I often use this stats screen to check filenames and such:

Unfortunately, if I try to increase the volume too quickly after checking the filename, 0 instead changes the stats page to an unhelpful "Internal performance info" screen that looks like this until quitting mpv:

How can I remove this behaviour from the 0 key and make it always act as volume+ instead?
Solution 1:[1]
By re- or unbinding all offending (also script-specific) key binds.
While the stats script is active, its key bindings override any existing ones, but those can be changed or removed.
You can add the option key_page_0=key to script-opts/stats.conf in an mpv configuration location such as the following file:
# ~/.config/mpv/script-opts/stats.conf
key_page_0=5
# to disable instead: key_page_0=
Unlike most configuration, this file is NOT cumulative with itself across locations. (everything from /etc/mpv/script-opts/stats.conf is ignored instead of added to if you also have ~/.config/mpv/script-opts/stats.conf)
Or append stats-key_page_0=key to the script-opts list,
such as, to unbind:mpv --script-opts-append=stats-key_page_0=
or in an mpv.conf file:
# ~/.config/mpv/mpv.conf
script-opts-append=stats-key_page_0=
# to change instead: script-opts-append=stats-key_page_0=5
In the meantime:
You can revert the page back to "Show usual stats" by pressing 1 while shown instead of restarting mpv.
From the mpv manual:
While the stats are visible on screen the following key bindings are active, regardless of existing bindings. They allow you to switch between pages of stats:1 Show usual stats 2 Show frame timings (scroll) 3 Input cache stats 4 Active key bindings (scroll) 0 Internal stuff (scroll)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mossymountain |
