2014-08-11 21:32:37 +00:00
|
|
|
# mpv keybindings
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
2014-08-11 21:32:37 +00:00
|
|
|
# Location of user-defined bindings: ~/.config/mpv/input.conf
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
2014-08-11 21:32:37 +00:00
|
|
|
# Lines starting with # are comments. Use SHARP to assign the # key.
|
|
|
|
# Copy this file and uncomment and edit the bindings you want to change.
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
2014-08-11 21:32:37 +00:00
|
|
|
# List of commands and further details: DOCS/man/input.rst
|
|
|
|
# List of special keys: --input-keylist
|
|
|
|
# Keybindings testing mode: mpv --input-test --force-window --idle
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
2014-08-11 21:32:37 +00:00
|
|
|
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
2012-09-22 12:54:57 +00:00
|
|
|
# Strings need to be quoted and escaped:
|
2015-05-25 19:59:44 +00:00
|
|
|
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
|
|
|
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
|
2014-08-11 21:32:37 +00:00
|
|
|
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
|
|
|
|
#
|
|
|
|
# The default keybindings are hardcoded into the mpv binary.
|
|
|
|
# You can disable them completely with: --no-input-default-bindings
|
2013-09-01 15:06:11 +00:00
|
|
|
|
2013-11-06 19:27:19 +00:00
|
|
|
# Developer note:
|
2014-08-11 21:32:37 +00:00
|
|
|
# On compilation, this file is baked into the mpv binary, and all lines are
|
|
|
|
# uncommented (unless '#' is followed by a space) - thus this file defines the
|
|
|
|
# default key bindings.
|
2013-09-01 15:06:11 +00:00
|
|
|
|
2014-02-25 21:09:20 +00:00
|
|
|
# If this is enabled, treat all the following bindings as default.
|
|
|
|
#default-bindings start
|
|
|
|
|
input: use mnemonic names for mouse buttons
mpv's mouse button numbering is based on X11 button numbering, which
allows for an arbitrary number of buttons and includes mouse wheel input
as buttons 3-6. This button numbering was used throughout the codebase
and exposed in input.conf, and it was difficult to remember which
physical button each number actually referred to and which referred to
the scroll wheel.
In practice, PC mice only have between two and five buttons and one or
two scroll wheel axes, which are more or less in the same location and
have more or less the same function. This allows us to use names to
refer to the buttons instead of numbers, which makes input.conf syntax a
lot easier to remember. It also makes the syntax robust to changes in
mpv's underlying numbering. The old MOUSE_BTNx names are still
understood as deprecated aliases of the named buttons.
This changes both the input.conf syntax and the MP_MOUSE_BTNx symbols in
the codebase, since I think both would benefit from using names over
numbers, especially since some platforms don't use X11 button numbering
and handle different mouse buttons in different windowing system events.
This also makes the names shorter, since otherwise they would be pretty
long, and it removes the high-numbered MOUSE_BTNx_DBL names, since they
weren't used.
Names are the same as used in Qt:
https://doc.qt.io/qt-5/qt.html#MouseButton-enum
2017-08-08 11:34:38 +00:00
|
|
|
#MBTN_LEFT ignore # don't do anything
|
2021-07-20 17:27:22 +00:00
|
|
|
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen
|
|
|
|
#MBTN_RIGHT cycle pause # toggle pause/playback mode
|
|
|
|
#MBTN_BACK playlist-prev # skip to the previous file
|
|
|
|
#MBTN_FORWARD playlist-next # skip to the next file
|
2012-01-17 01:49:27 +00:00
|
|
|
|
2013-07-25 16:08:57 +00:00
|
|
|
# Mouse wheels, touchpad or other input devices that have axes
|
2013-08-07 20:20:10 +00:00
|
|
|
# if the input devices supports precise scrolling it will also scale the
|
|
|
|
# numeric value accordingly
|
2023-08-29 18:32:03 +00:00
|
|
|
#WHEEL_UP add volume 2
|
|
|
|
#WHEEL_DOWN add volume -2
|
|
|
|
#WHEEL_LEFT seek -10 # seek 10 seconds backward
|
|
|
|
#WHEEL_RIGHT seek 10 # seek 10 seconds forward
|
2013-07-25 16:08:57 +00:00
|
|
|
|
2013-09-01 15:06:11 +00:00
|
|
|
## Seek units are in seconds, but note that these are limited by keyframes
|
2021-07-20 17:27:22 +00:00
|
|
|
#RIGHT seek 5 # seek 5 seconds forward
|
|
|
|
#LEFT seek -5 # seek 5 seconds backward
|
|
|
|
#UP seek 60 # seek 1 minute forward
|
|
|
|
#DOWN seek -60 # seek 1 minute backward
|
2010-12-19 11:34:06 +00:00
|
|
|
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
|
2012-09-25 01:25:44 +00:00
|
|
|
# Don't show them on the OSD (no-osd).
|
2021-07-20 17:27:22 +00:00
|
|
|
#Shift+RIGHT no-osd seek 1 exact # seek exactly 1 second forward
|
|
|
|
#Shift+LEFT no-osd seek -1 exact # seek exactly 1 second backward
|
|
|
|
#Shift+UP no-osd seek 5 exact # seek exactly 5 seconds forward
|
|
|
|
#Shift+DOWN no-osd seek -5 exact # seek exactly 5 seconds backward
|
|
|
|
#Ctrl+LEFT no-osd sub-seek -1 # seek to the previous subtitle
|
|
|
|
#Ctrl+RIGHT no-osd sub-seek 1 # seek to the next subtitle
|
|
|
|
#Ctrl+Shift+LEFT sub-step -1 # change subtitle timing such that the previous subtitle is displayed
|
|
|
|
#Ctrl+Shift+RIGHT sub-step 1 # change subtitle timing such that the next subtitle is displayed
|
|
|
|
#Alt+left add video-pan-x 0.1 # move the video right
|
|
|
|
#Alt+right add video-pan-x -0.1 # move the video left
|
|
|
|
#Alt+up add video-pan-y 0.1 # move the video down
|
|
|
|
#Alt+down add video-pan-y -0.1 # move the video up
|
|
|
|
#Alt++ add video-zoom 0.1 # zoom in
|
2023-08-15 11:27:03 +00:00
|
|
|
#ZOOMIN add video-zoom 0.1 # zoom in
|
2021-07-20 17:27:22 +00:00
|
|
|
#Alt+- add video-zoom -0.1 # zoom out
|
2023-08-15 11:27:03 +00:00
|
|
|
#ZOOMOUT add video-zoom -0.1 # zoom out
|
input.conf: bind Ctrl+WHEEL_UP/DOWN to video-zoom
There are good reasons to bind Ctrl+WHEEL_UP/WHEEL_DOWN to video-zoom:
- They are ubiquitous and familiar key bindings to represent zooming
operations, which are used in all popular web browsers, document viewers,
and document editors.
- Because WHEEL_UP/WHEEL_DOWN are scaled with high-resolution scrolling
input devices like touchpads, this allows smooth zooming.
- This makes "pinch to zoom" with touchpads and touchscreens work out of
box on Windows, since by default applications receive these key inputs
for pinch gesture.
- It had been considered to bind these keys to window-scale instead.
However, this results in horrible UX as the keybinds work only when the
mouse pointer is over the mpv window, and if the window shrinks during
this operation, the window below mpv now receives these keybinds,
resulting in unwanted zooming for that window, which violates the principle
of least surprise.
2024-02-18 18:57:05 +00:00
|
|
|
#Ctrl+WHEEL_UP add video-zoom 0.1 # zoom in
|
|
|
|
#Ctrl+WHEEL_DOWN add video-zoom -0.1 # zoom out
|
2024-06-12 13:32:38 +00:00
|
|
|
#Alt+BS set video-zoom 0; set panscan 0; set video-pan-x 0; set video-pan-y 0 # reset zoom and pan settings
|
2021-07-20 17:27:22 +00:00
|
|
|
#PGUP add chapter 1 # seek to the next chapter
|
|
|
|
#PGDWN add chapter -1 # seek to the previous chapter
|
|
|
|
#Shift+PGUP seek 600 # seek 10 minutes forward
|
|
|
|
#Shift+PGDWN seek -600 # seek 10 minutes backward
|
|
|
|
#[ multiply speed 1/1.1 # decrease the playback speed
|
|
|
|
#] multiply speed 1.1 # increase the playback speed
|
|
|
|
#{ multiply speed 0.5 # halve the playback speed
|
|
|
|
#} multiply speed 2.0 # double the playback speed
|
|
|
|
#BS set speed 1.0 # reset the speed to normal
|
|
|
|
#Shift+BS revert-seek # undo the previous (or marked) seek
|
|
|
|
#Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek
|
2021-08-19 13:32:55 +00:00
|
|
|
#q quit
|
2021-07-20 17:27:22 +00:00
|
|
|
#Q quit-watch-later # exit and remember the playback position
|
2021-08-19 13:32:55 +00:00
|
|
|
#q {encode} quit 4
|
2021-07-20 17:27:22 +00:00
|
|
|
#ESC set fullscreen no # leave fullscreen
|
2021-08-19 13:32:55 +00:00
|
|
|
#ESC {encode} quit 4
|
2013-09-01 15:06:11 +00:00
|
|
|
#p cycle pause # toggle pause/playback mode
|
2015-05-25 19:59:44 +00:00
|
|
|
#. frame-step # advance one frame and pause
|
|
|
|
#, frame-back-step # go back by one frame and pause
|
2021-07-20 17:27:22 +00:00
|
|
|
#SPACE cycle pause # toggle pause/playback mode
|
|
|
|
#> playlist-next # skip to the next file
|
|
|
|
#ENTER playlist-next # skip to the next file
|
|
|
|
#< playlist-prev # skip to the previous file
|
|
|
|
#O no-osd cycle-values osd-level 3 1 # toggle displaying the OSD on user interaction or always
|
|
|
|
#o show-progress # show playback progress
|
|
|
|
#P show-progress # show playback progress
|
|
|
|
#i script-binding stats/display-stats # display information and statistics
|
|
|
|
#I script-binding stats/display-stats-toggle # toggle displaying information and statistics
|
|
|
|
#` script-binding console/enable # open the console
|
|
|
|
#z add sub-delay -0.1 # shift subtitles 100 ms earlier
|
|
|
|
#Z add sub-delay +0.1 # delay subtitles by 100 ms
|
|
|
|
#x add sub-delay +0.1 # delay subtitles by 100 ms
|
|
|
|
#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio
|
|
|
|
#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier
|
|
|
|
#Shift+g add sub-scale +0.1 # increase the subtitle font size
|
|
|
|
#Shift+f add sub-scale -0.1 # decrease the subtitle font size
|
2021-08-19 13:32:55 +00:00
|
|
|
#9 add volume -2
|
|
|
|
#/ add volume -2
|
2024-08-11 04:10:52 +00:00
|
|
|
#KP_DIVIDE add volume -2
|
2021-08-19 13:32:55 +00:00
|
|
|
#0 add volume 2
|
|
|
|
#* add volume 2
|
2024-08-11 04:10:52 +00:00
|
|
|
#KP_MULTIPLY add volume 2
|
2021-07-20 17:27:22 +00:00
|
|
|
#m cycle mute # toggle mute
|
2021-08-19 13:32:55 +00:00
|
|
|
#1 add contrast -1
|
|
|
|
#2 add contrast 1
|
|
|
|
#3 add brightness -1
|
|
|
|
#4 add brightness 1
|
|
|
|
#5 add gamma -1
|
|
|
|
#6 add gamma 1
|
|
|
|
#7 add saturation -1
|
|
|
|
#8 add saturation 1
|
2024-02-25 20:10:00 +00:00
|
|
|
#Alt+0 set window-scale 0.5 # halve the window size
|
|
|
|
#Alt+1 set window-scale 1.0 # reset the window size
|
|
|
|
#Alt+2 set window-scale 2.0 # double the window size
|
2023-12-27 15:37:58 +00:00
|
|
|
#b cycle deband # toggle the debanding filter
|
2024-01-22 02:37:47 +00:00
|
|
|
#d cycle deinterlace # cycle the deinterlacing filter
|
2013-09-01 15:06:11 +00:00
|
|
|
#r add sub-pos -1 # move subtitles up
|
2021-07-20 17:27:22 +00:00
|
|
|
#R add sub-pos +1 # move subtitles down
|
|
|
|
#t add sub-pos +1 # move subtitles down
|
|
|
|
#v cycle sub-visibility # hide or show the subtitles
|
2022-01-19 19:56:28 +00:00
|
|
|
#Alt+v cycle secondary-sub-visibility # hide or show the secondary subtitles
|
2021-07-20 17:27:22 +00:00
|
|
|
#V cycle sub-ass-vsfilter-aspect-compat # toggle stretching SSA/ASS subtitles with anamorphic videos to match the historical renderer
|
2024-05-27 14:00:23 +00:00
|
|
|
#u cycle-values sub-ass-override "force" "scale" # toggle overriding SSA/ASS subtitle styles with the normal styles
|
2021-07-20 17:27:22 +00:00
|
|
|
#j cycle sub # switch subtitle track
|
|
|
|
#J cycle sub down # switch subtitle track backwards
|
|
|
|
#SHARP cycle audio # switch audio track
|
|
|
|
#_ cycle video # switch video track
|
|
|
|
#T cycle ontop # toggle placing the video on top of other windows
|
2013-09-01 15:06:11 +00:00
|
|
|
#f cycle fullscreen # toggle fullscreen
|
2021-07-20 17:27:22 +00:00
|
|
|
#s screenshot # take a screenshot of the video in its original resolution with subtitles
|
|
|
|
#S screenshot video # take a screenshot of the video in its original resolution without subtitles
|
|
|
|
#Ctrl+s screenshot window # take a screenshot of the window with OSD and subtitles
|
|
|
|
#Alt+s screenshot each-frame # automatically screenshot every frame; issue this command again to stop taking screenshots
|
|
|
|
#w add panscan -0.1 # decrease panscan
|
|
|
|
#W add panscan +0.1 # shrink black bars by cropping the video
|
|
|
|
#e add panscan +0.1 # shrink black bars by cropping the video
|
|
|
|
#A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" # cycle the video aspect ratio ("-1" is the container aspect)
|
2021-08-19 13:32:55 +00:00
|
|
|
#POWER quit
|
2021-07-20 17:27:22 +00:00
|
|
|
#PLAY cycle pause # toggle pause/playback mode
|
|
|
|
#PAUSE cycle pause # toggle pause/playback mode
|
|
|
|
#PLAYPAUSE cycle pause # toggle pause/playback mode
|
|
|
|
#PLAYONLY set pause no # unpause
|
|
|
|
#PAUSEONLY set pause yes # pause
|
2021-08-19 13:32:55 +00:00
|
|
|
#STOP quit
|
2021-07-20 17:27:22 +00:00
|
|
|
#FORWARD seek 60 # seek 1 minute forward
|
|
|
|
#REWIND seek -60 # seek 1 minute backward
|
|
|
|
#NEXT playlist-next # skip to the next file
|
|
|
|
#PREV playlist-prev # skip to the previous file
|
2021-08-19 13:32:55 +00:00
|
|
|
#VOLUME_UP add volume 2
|
|
|
|
#VOLUME_DOWN add volume -2
|
2021-07-20 17:27:22 +00:00
|
|
|
#MUTE cycle mute # toggle mute
|
2021-08-19 13:32:55 +00:00
|
|
|
#CLOSE_WIN quit
|
|
|
|
#CLOSE_WIN {encode} quit 4
|
|
|
|
#ctrl+w quit
|
2021-07-20 17:27:22 +00:00
|
|
|
#E cycle edition # switch edition
|
|
|
|
#l ab-loop # set/clear A-B loop points
|
2017-01-31 10:46:43 +00:00
|
|
|
#L cycle-values loop-file "inf" "no" # toggle infinite looping
|
2021-08-19 13:32:55 +00:00
|
|
|
#ctrl+c quit 4
|
2021-07-20 17:27:22 +00:00
|
|
|
#DEL script-binding osc/visibility # cycle OSC visibility between never, auto (mouse-move) and always
|
2023-07-02 00:17:44 +00:00
|
|
|
#ctrl+h cycle-values hwdec "auto-safe" "no" # toggle hardware decoding
|
2021-07-20 17:27:22 +00:00
|
|
|
#F8 show-text ${playlist} # show the playlist
|
|
|
|
#F9 show-text ${track-list} # show the list of video, audio and sub tracks
|
2024-05-12 19:57:56 +00:00
|
|
|
#g ignore
|
|
|
|
#g-p script-binding select/select-playlist
|
|
|
|
#g-s script-binding select/select-sid
|
|
|
|
#g-S script-binding select/select-secondary-sid
|
|
|
|
#g-a script-binding select/select-aid
|
|
|
|
#g-v script-binding select/select-vid
|
|
|
|
#g-t script-binding select/select-track
|
|
|
|
#g-c script-binding select/select-chapter
|
|
|
|
#g-l script-binding select/select-subtitle-line
|
|
|
|
#g-d script-binding select/select-audio-device
|
|
|
|
#g-b script-binding select/select-binding
|
|
|
|
#g-r script-binding select/show-properties
|
2013-06-27 16:21:07 +00:00
|
|
|
|
2024-06-13 19:17:23 +00:00
|
|
|
#Alt+KP1 add video-rotate -1 # rotate video counterclockwise by 1 degree
|
|
|
|
#Alt+KP5 set video-rotate 0 # reset rotation
|
|
|
|
#Alt+KP3 add video-rotate 1 # rotate video clockwise by 1 degree
|
|
|
|
|
|
|
|
#KP1 add video-zoom -0.01 # zoom out video
|
|
|
|
#KP2 add video-scale-y -0.01 # scale down video vertically
|
|
|
|
#KP4 add video-scale-x -0.01 # scale down video horizontally
|
|
|
|
#KP5 set video-scale-x 1.00; set video-scale-y 1; set video-zoom 0 # reset video scale
|
|
|
|
#KP6 add video-scale-x 0.01 # scale up video horizontally
|
|
|
|
#KP8 add video-scale-y 0.01 # scale up video vertically
|
|
|
|
#KP9 add video-zoom 0.01 # zoom in video
|
|
|
|
|
|
|
|
#Ctrl+KP1 add video-pan-x -0.01; add video-pan-y 0.01 # move video left and down
|
|
|
|
#Ctrl+KP2 add video-pan-y 0.01 # move video down
|
|
|
|
#Ctrl+KP3 add video-pan-x 0.01; add video-pan-y 0.01 # move video right and down
|
|
|
|
#Ctrl+KP4 add video-pan-x -0.01 # move video left
|
|
|
|
#Ctrl+KP5 set video-pan-x 0.00; set video-pan-y 0.00 # reset video position
|
|
|
|
#Ctrl+KP6 add video-pan-x 0.01 # move video right
|
|
|
|
#Ctrl+KP7 add video-pan-x -0.01; add video-pan-y -0.01 # move video left and up
|
|
|
|
#Ctrl+KP8 add video-pan-y -0.01 # move video up
|
|
|
|
#Ctrl+KP9 add video-pan-x 0.01; add video-pan-y -0.01 # move video right and up
|
|
|
|
|
|
|
|
#Ctrl+KP_END add video-align-x -0.01; add video-align-y 0.01 # align video left and down
|
|
|
|
#Ctrl+KP_DOWN add video-align-y 0.01 # align video down
|
|
|
|
#Ctrl+KP_PGDWN add video-align-x 0.01; add video-align-y 0.01 # align video right and down
|
|
|
|
#Ctrl+KP_LEFT add video-align-x -0.01 # align video left
|
|
|
|
#Ctrl+KP_BEGIN set video-align-x 0.00; set video-align-y 0.00 # reset video alignment
|
|
|
|
#Ctrl+KP_RIGHT add video-align-x 0.01 # align video right
|
|
|
|
#Ctrl+KP_HOME add video-align-x -0.01; add video-align-y -0.01 # align video left and up
|
|
|
|
#Ctrl+KP_UP add video-align-y -0.01 # align video up
|
|
|
|
#Ctrl+KP_PGUP add video-align-x 0.01; add video-align-y -0.01 # align video right and up
|
|
|
|
|
2014-08-07 21:55:09 +00:00
|
|
|
#
|
|
|
|
# Legacy bindings (may or may not be removed in the future)
|
|
|
|
#
|
2021-07-20 17:27:22 +00:00
|
|
|
#! add chapter -1 # seek to the previous chapter
|
|
|
|
#@ add chapter 1 # seek to the next chapter
|
2014-08-07 21:55:09 +00:00
|
|
|
|
2012-01-17 01:49:27 +00:00
|
|
|
#
|
|
|
|
# Not assigned by default
|
|
|
|
# (not an exhaustive list of unbound commands)
|
|
|
|
#
|
2008-05-18 12:19:51 +00:00
|
|
|
|
2023-08-29 01:15:49 +00:00
|
|
|
# ? cycle sub-forced-events-only # display only DVD/PGS forced subtitle events
|
2014-08-07 22:43:14 +00:00
|
|
|
# ? stop # stop playback (quit or enter idle mode)
|