# docs:
# - <https://mpv.io/manual/master/#list-of-input-commands>
# - script-binding: <https://mpv.io/manual/master/#command-interface-script-binding>
# - properties: <https://mpv.io/manual/master/#property-list>

# let volume/power keys be interpreted by the system.
# this is important for moby/bonsai.
# mpv defaults is POWER = close, VOLUME_{UP,DOWN} = adjust application-level volume
POWER ignore
VOLUME_UP ignore
VOLUME_DOWN ignore
# disable "double-click to toggle fullscreen", else that limits the rate at which i can seek
# MBTN_LEFT_DBL ignore
MBTN_LEFT_DBL cycle-values video-zoom 2.0 1.0   #< XXX: uosc eats this event

# image panning via image-positioning.lua
# uosc swallows all (?) LMB inputs, so pan with middle button
MBTN_LEFT script-binding drag-to-pan  #< XXX: uosc eats this event
MBTN_MID script-binding drag-to-pan
CTRL+MBTN_LEFT script-binding drag-to-pan
WHEEL_UP   script-message cursor-centric-zoom 0.2
WHEEL_DOWN script-message cursor-centric-zoom -0.2

# uosc menu
# text after the shebang is parsed by uosc to construct the menu and names
menu        script-binding uosc/menu
s           script-binding uosc/subtitles          #! Subtitles
a           script-binding uosc/audio              #! Audio track
q           script-binding uosc/stream-quality     #! Stream quality
#           script-binding uosc/audio-device       #! Audio device
ctrl+r      script-binding sane_cast/audio-cast    #! Audiocast
ctrl+t      script-binding sane_cast/sane-cast     #! Cast
ctrl+s      async screenshot                       #! Screenshot
O           script-binding uosc/show-in-directory  #! Open folder

# uosc defaults, kept here but unused
p           script-binding uosc/items              # Playlist
#           script-binding uosc/chapters           # Chapters
>           script-binding uosc/next               # Navigation > Next
<           script-binding uosc/prev               # Navigation > Prev
o           script-binding uosc/open-file          # Navigation > Open file
#           set video-aspect-override "-1"         # Utils > Aspect ratio > Default
#           set video-aspect-override "16:9"       # Utils > Aspect ratio > 16:9
#           set video-aspect-override "4:3"        # Utils > Aspect ratio > 4:3
#           set video-aspect-override "2.35:1"     # Utils > Aspect ratio > 2.35:1
#           script-binding uosc/editions           # Utils > Editions
#           script-binding uosc/open-config-directory # Utils > Open config directory
alt+i       script-binding uosc/keybinds           # Utils > Key bindings
#
# mpv-visualizer: reserved: it uses this internally, isn't externally callable
# v           script-binding cycle-visualizer
