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
|
|
|
|
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off
|
|
|
|
#MBTN_RIGHT cycle pause # toggle pause on/off
|
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
|
2017-09-02 14:00:52 +00:00
|
|
|
#WHEEL_UP seek 10
|
|
|
|
#WHEEL_DOWN seek -10
|
|
|
|
#WHEEL_LEFT add volume -2
|
|
|
|
#WHEEL_RIGHT add volume 2
|
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
|
2014-08-11 11:37:18 +00:00
|
|
|
#RIGHT seek 5
|
|
|
|
#LEFT seek -5
|
2013-09-01 15:06:11 +00:00
|
|
|
#UP seek 60
|
|
|
|
#DOWN seek -60
|
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).
|
2015-03-04 16:21:02 +00:00
|
|
|
#Shift+RIGHT no-osd seek 1 exact
|
|
|
|
#Shift+LEFT no-osd seek -1 exact
|
|
|
|
#Shift+UP no-osd seek 5 exact
|
|
|
|
#Shift+DOWN no-osd seek -5 exact
|
2014-11-19 22:03:42 +00:00
|
|
|
# Skip to previous/next subtitle (subject to some restrictions; see manpage)
|
2015-05-25 19:59:44 +00:00
|
|
|
#Ctrl+LEFT no-osd sub-seek -1
|
|
|
|
#Ctrl+RIGHT no-osd sub-seek 1
|
2014-08-09 00:24:10 +00:00
|
|
|
#PGUP add chapter 1 # skip to next chapter
|
|
|
|
#PGDWN add chapter -1 # skip to previous chapter
|
|
|
|
#Shift+PGUP seek 600
|
|
|
|
#Shift+PGDWN seek -600
|
2013-10-31 22:25:55 +00:00
|
|
|
#[ multiply speed 0.9091 # scale playback speed
|
|
|
|
#] multiply speed 1.1
|
|
|
|
#{ multiply speed 0.5
|
|
|
|
#} multiply speed 2.0
|
2013-09-01 15:06:11 +00:00
|
|
|
#BS set speed 1.0 # reset speed to normal
|
|
|
|
#q quit
|
2015-05-25 19:59:44 +00:00
|
|
|
#Q quit-watch-later
|
2015-07-11 18:07:58 +00:00
|
|
|
#q {encode} quit 4
|
2014-09-15 21:22:21 +00:00
|
|
|
#ESC set fullscreen no
|
2015-07-11 18:07:58 +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
|
2013-09-01 15:06:11 +00:00
|
|
|
#SPACE cycle pause
|
2015-05-25 19:59:44 +00:00
|
|
|
#> playlist-next # skip to next file
|
|
|
|
#ENTER playlist-next # skip to next file
|
|
|
|
#< playlist-prev # skip to previous file
|
2016-07-14 18:04:59 +00:00
|
|
|
#O no-osd cycle-values osd-level 3 1 # cycle through OSD mode
|
2015-05-25 19:59:44 +00:00
|
|
|
#o show-progress
|
|
|
|
#P show-progress
|
2013-09-01 15:06:11 +00:00
|
|
|
#z add sub-delay -0.1 # subtract 100 ms delay from subs
|
|
|
|
#x add sub-delay +0.1 # add
|
2014-08-11 21:40:35 +00:00
|
|
|
#ctrl++ add audio-delay 0.100 # this changes audio/video sync
|
|
|
|
#ctrl+- add audio-delay -0.100
|
2014-09-21 13:41:33 +00:00
|
|
|
#9 add volume -2
|
|
|
|
#/ add volume -2
|
|
|
|
#0 add volume 2
|
|
|
|
#* add volume 2
|
2013-09-01 15:06:11 +00:00
|
|
|
#m cycle mute
|
|
|
|
#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
|
2015-11-17 20:49:30 +00:00
|
|
|
#Alt+0 set window-scale 0.5
|
|
|
|
#Alt+1 set window-scale 1.0
|
|
|
|
#Alt+2 set window-scale 2.0
|
2014-08-07 22:43:14 +00:00
|
|
|
# toggle deinterlacer (automatically inserts or removes required filter)
|
2015-08-03 23:04:26 +00:00
|
|
|
#d cycle deinterlace
|
2013-09-01 15:06:11 +00:00
|
|
|
#r add sub-pos -1 # move subtitles up
|
|
|
|
#t add sub-pos +1 # down
|
|
|
|
#v cycle sub-visibility
|
2012-01-17 01:49:27 +00:00
|
|
|
# stretch SSA/ASS subtitles with anamorphic videos to match historical
|
2016-10-03 15:16:02 +00:00
|
|
|
#V cycle sub-ass-vsfilter-aspect-compat
|
2015-03-08 14:57:25 +00:00
|
|
|
# switch between applying no style overrides to SSA/ASS subtitles, and
|
|
|
|
# overriding them almost completely with the normal subtitle style
|
2017-06-07 18:18:25 +00:00
|
|
|
#u cycle-values sub-ass-override "force" "no"
|
2013-09-01 15:06:11 +00:00
|
|
|
#j cycle sub # cycle through subtitles
|
|
|
|
#J cycle sub down # ...backwards
|
|
|
|
#SHARP cycle audio # switch audio streams
|
|
|
|
#_ cycle video
|
|
|
|
#T cycle ontop # toggle video window ontop of other windows
|
|
|
|
#f cycle fullscreen # toggle fullscreen
|
player: make screenshot commands honor the async flag
And also change input.conf to make all screenshots async. (Except the
every-frame mode, which always uses synchronous mode and ignores the
flag.) By default, the "screenshot" command is still asynchronous,
because scripts etc. might depend on this behavior.
This is only partially async. The code for determining the filename is
still always run synchronously. Only encoding the screenshot and writing
it to disk is asynchronous. We explicitly document the exact behavior as
undefined, so it can be changed any time.
Some of this is a bit messy, because I wanted to avoid duplicating the
message display code between sync and async mode. In async mode, this is
called from a worker thread, which is not safe because showing a message
accesses the thread-unsafe OSD code. So the core has to be locked during
this, which implies accessing the core and all that. So the code has
weird locking calls, and we need to do core destruction in a more
"controlled" manner (thus the outstanding_async field).
(What I'd really want would be the OSD simply showing log messages
instead.)
This is pretty untested, so expect bugs.
Fixes #4250.
2017-04-01 18:45:20 +00:00
|
|
|
#s async screenshot # take a screenshot
|
|
|
|
#S async screenshot video # ...without subtitles
|
|
|
|
#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled
|
2015-03-04 16:21:02 +00:00
|
|
|
#Alt+s screenshot each-frame # automatically screenshot every frame
|
2013-09-01 15:06:11 +00:00
|
|
|
#w add panscan -0.1 # zoom out with -panscan 0 -fs
|
|
|
|
#e add panscan +0.1 # in
|
2015-01-26 02:03:19 +00:00
|
|
|
# cycle video aspect ratios; "-1" is the container aspect
|
2015-05-25 19:59:44 +00:00
|
|
|
#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
|
2013-09-01 15:06:11 +00:00
|
|
|
#POWER quit
|
|
|
|
#PLAY cycle pause
|
|
|
|
#PAUSE cycle pause
|
|
|
|
#PLAYPAUSE cycle pause
|
|
|
|
#STOP quit
|
|
|
|
#FORWARD seek 60
|
|
|
|
#REWIND seek -60
|
2015-05-25 19:59:44 +00:00
|
|
|
#NEXT playlist-next
|
|
|
|
#PREV playlist-prev
|
2014-09-21 13:41:33 +00:00
|
|
|
#VOLUME_UP add volume 2
|
|
|
|
#VOLUME_DOWN add volume -2
|
2013-09-01 15:06:11 +00:00
|
|
|
#MUTE cycle mute
|
|
|
|
#CLOSE_WIN quit
|
2015-07-11 18:07:58 +00:00
|
|
|
#CLOSE_WIN {encode} quit 4
|
2013-09-01 15:06:11 +00:00
|
|
|
#E cycle edition # next edition
|
2016-04-21 20:15:17 +00:00
|
|
|
#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
|
2015-07-11 18:07:58 +00:00
|
|
|
#ctrl+c quit 4
|
2013-06-27 16:21:07 +00:00
|
|
|
|
2013-06-02 22:52:40 +00:00
|
|
|
# Apple Remote section
|
2013-09-01 15:06:11 +00:00
|
|
|
#AR_PLAY cycle pause
|
|
|
|
#AR_PLAY_HOLD quit
|
|
|
|
#AR_CENTER cycle pause
|
|
|
|
#AR_CENTER_HOLD quit
|
|
|
|
#AR_NEXT seek 10
|
|
|
|
#AR_NEXT_HOLD seek 120
|
|
|
|
#AR_PREV seek -10
|
|
|
|
#AR_PREV_HOLD seek -120
|
2015-05-25 19:59:44 +00:00
|
|
|
#AR_MENU show-progress
|
2013-09-01 15:06:11 +00:00
|
|
|
#AR_MENU_HOLD cycle mute
|
2014-09-21 13:41:33 +00:00
|
|
|
#AR_VUP add volume 2
|
2013-09-01 15:06:11 +00:00
|
|
|
#AR_VUP_HOLD add chapter 1
|
2014-09-21 13:41:33 +00:00
|
|
|
#AR_VDOWN add volume -2
|
2013-09-01 15:06:11 +00:00
|
|
|
#AR_VDOWN_HOLD add chapter -1
|
2013-06-02 22:52:40 +00:00
|
|
|
|
2014-08-07 21:55:09 +00:00
|
|
|
#
|
|
|
|
# Legacy bindings (may or may not be removed in the future)
|
|
|
|
#
|
|
|
|
#! add chapter -1 # skip to previous chapter
|
|
|
|
#@ add chapter 1 # next
|
|
|
|
|
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
|
|
|
|
2013-09-01 15:06:11 +00:00
|
|
|
# ? add sub-scale +0.1 # increase subtitle font size
|
|
|
|
# ? add sub-scale -0.1 # decrease subtitle font size
|
2015-05-25 19:59:44 +00:00
|
|
|
# ? sub-step -1 # immediately display next subtitle
|
|
|
|
# ? sub-step +1 # previous
|
2014-08-07 22:43:14 +00:00
|
|
|
# ? cycle angle # switch DVD/Bluray angle
|
|
|
|
# ? add balance -0.1 # adjust audio balance in favor of left
|
|
|
|
# ? add balance 0.1 # right
|
|
|
|
# ? cycle sub-forced-only # toggle DVD forced subs
|
|
|
|
# ? cycle program # cycle transport stream programs
|
|
|
|
# ? stop # stop playback (quit or enter idle mode)
|