Skip to content

Instantly share code, notes, and snippets.

@FINCTIVE
Created Feb 3, 2021
Embed
What would you like to do?
mpv - input.conf
# mpv keybindings like youtube
#
# Location of user-defined bindings: ~/.config/mpv/input.conf
#
# Lines starting with # are comments. Use SHARP to assign the # key.
# Copy this file and uncomment and edit the bindings you want to change.
#
# 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
#
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
#
# Strings need to be quoted and escaped:
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
#
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
# 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
# Developer note:
# 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.
# If this is enabled, treat all the following bindings as default.
#default-bindings start
# 鼠标
MBTN_LEFT ignore # don't do anything
MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off
MBTN_RIGHT cycle pause # toggle pause on/off
MBTN_BACK playlist-prev
MBTN_FORWARD playlist-next
# 方向键
RIGHT seek 1
LEFT seek -1
UP add volume 1
DOWN add volume -1
# 滚轮
# Mouse wheels, touchpad or other input devices that have axes
# if the input devices supports precise scrolling it will also scale the
# numeric value accordingly
WHEEL_UP add volume 1
WHEEL_DOWN add volume -1
WHEEL_LEFT ignore
WHEEL_RIGHT ignore
# 常用按键
SPACE cycle pause
ENTER cycle fullscreen
ESC set fullscreen no
# 参考Youtube快捷键
k cycle pause # toggle pause/playback mode
m cycle mute
f cycle fullscreen # toggle fullscreen
c cycle sub-visibility
> add speed 0.125
< add speed -0.125
. frame-step # advance one frame and pause
, frame-back-step # go back by one frame and pause
# 以下快捷键是自定义的
# stretch SSA/ASS subtitles with anamorphic videos to match historical
# 设置SSA/ASS字幕成默认样式
C cycle sub-ass-vsfilter-aspect-compat
Alt+down add sub-pos +1 # move subtitles up
Alt+up add sub-pos -1 # down
{ add sub-delay -0.1 # subtract 100 ms delay from subs
} add sub-delay +0.1 # add
# 画面和声音不同步的时候使用
Alt+] add audio-delay 0.100 # this changes audio/video sync
Alt+[ add audio-delay -0.100
# 以下快捷键来自原版mpv
T cycle ontop # toggle video window ontop of other windows
# 截图(带字幕)
s screenshot # take a screenshot
# 截图(不带字幕)
S screenshot video # ...without subtitles
# 截图每一帧
Alt+s screenshot each-frame # automatically screenshot every frame
# 显示视频信息
i script-binding stats/display-stats
I script-binding stats/display-stats-toggle
# Skip to previous/next subtitle (subject to some restrictions; see manpage)
# 跳到下一句/上一句字幕位置
Ctrl+LEFT no-osd sub-seek -1
Ctrl+RIGHT no-osd sub-seek 1
# 这部分功能键(和没看懂的)没有改变
#POWER quit
#PLAY cycle pause
#PAUSE cycle pause
#PLAYPAUSE cycle pause
#PLAYONLY set pause no
#PAUSEONLY set pause yes
#STOP quit
#FORWARD seek 60
#REWIND seek -60
#NEXT playlist-next
#PREV playlist-prev
#VOLUME_UP add volume 2
#VOLUME_DOWN add volume -2
#MUTE cycle mute
#CLOSE_WIN quit
#CLOSE_WIN {encode} quit 4
#q {encode} quit 4
#ESC {encode} quit 4
# 以下按键全部禁用
Ctrl+s ignore
V ignore
r ignore
R ignore
t ignore
z ignore
Z ignore
x ignore
ctrl++ ignore
ctrl+- ignore
# Zoom/unzoom video
# Alt++ add video-zoom 0.1
Alt++ ignore
# Alt+- add video-zoom -0.1
Alt+- ignore
# ` script-binding console/enable
` ignore
# Adjust timing to previous/next subtitle
# Ctrl+Shift+LEFT sub-step -1
Ctrl+Shift+LEFT ignore
# Ctrl+Shift+RIGHT sub-step 1
Ctrl+Shift+RIGHT ignore
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
# Don't show them on the OSD (no-osd).
Shift+RIGHT ignore
Shift+LEFT ignore
Shift+UP ignore
Shift+DOWN ignore
# Move video rectangle
Alt+left ignore
Alt+right ignore
# Reset video zoom/pan settings
Alt+BS ignore
PGUP ignore # skip to next chapter
PGDWN ignore # skip to previous chapter
Shift+PGUP ignore
Shift+PGDWN ignore
[ ignore # scale playback speed
] ignore
BS ignore # reset speed to normal
Shift+BS ignore # undo previous (or marked) seek
Shift+Ctrl+BS ignore # mark position for revert-seek
q ignore
Q ignore
p ignore # toggle pause/playback mode
# ENTER ignore # skip to next file
O ignore # cycle through OSD mode
o ignore
P ignore
9 ignore
/ ignore
0 ignore
* ignore
1 ignore
2 ignore
3 ignore
4 ignore
5 ignore
6 ignore
7 ignore
8 ignore
Alt+0 ignore
Alt+1 ignore
Alt+2 ignore
# toggle deinterlacer (automatically inserts or removes required filter)
d ignore
v ignore
# switch between applying no style overrides to SSA/ASS subtitles, and
# overriding them almost completely with the normal subtitle style
u ignore
j ignore
J ignore
SHARP ignore
_ ignore
w ignore # zoom out with -panscan 0 -fs
W ignore # in
e ignore # same as previous binding (discouraged)
# cycle video aspect ratios; "-1" is the container aspect
A ignore
E ignore
l ignore
L ignore
ctrl+c ignore
DEL ignore
ctrl+h ignore
F8 ignore # show playlist
F9 ignore # show list of audio/sub streams
#
# Legacy bindings (may or may not be removed in the future)
#
! ignore # skip to previous chapter
@ ignore # next
#
# Not assigned by default
# (not an exhaustive list of unbound commands)
#
# ? add sub-scale +0.1 # increase subtitle font size
# ? add sub-scale -0.1 # decrease subtitle font size
# ? cycle angle # switch DVD/Bluray angle
# ? cycle sub-forced-only # toggle DVD forced subs
# ? cycle program # cycle transport stream programs
# ? stop # stop playback (quit or enter idle mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment