maoiscat / mpv-osc-modern

Another mpv osc script
GNU Lesser General Public License v2.1
333 stars 66 forks source link

How can I assign the 'DEL' key (or any other) to show OSC? #31

Closed emk2203 closed 1 year ago

emk2203 commented 1 year ago

With the default configuration of mpv, the DEL key toggles between the auto, always-on and always-off states of the OSC.

Is there a way to make the DEL key work with mpv-osc-modern so this behavior is replicated (or just that the OSC can be shown with a key press)? I use this in a HTPC setting with a IR remote, mouse hovering is unfortunately not an option.

I know it works when pausing the video, but sometimes I want to see how much time is left without pausing, just with a click of a button.

maoiscat commented 1 year ago

first add this line to the end of modern.lua file mp.add_key_binding(nil, 'show_osc', function() show_osc() end)

then add this line to your input.conf file DEL script-binding show_osc

emk2203 commented 1 year ago

This is perfect, and even better than default behavior. Short view of the OSC without the need to do anything else.