Skip to content

Commit 12e9cc6

Browse files
committed
input.conf: duplicate some keybind to keypad siblings
They still can be remapped individually by users, but let's duplicate them by default. More generic way of 8c6ad1d and d06f3d3. Fixes: mpv-player#15993
1 parent 630a036 commit 12e9cc6

File tree

2 files changed

+40
-15
lines changed

2 files changed

+40
-15
lines changed

DOCS/man/mpv.rst

+10-9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ See also ``--input-test`` for interactive binding details by key, and the
5050
`stats`_ built-in script for key bindings list (including print to terminal). By
5151
default, the ? key toggles the display of this list.
5252

53+
By default keypad keys are bound to thier siblings, e.g. ``KP_PGUP`` is bound to
54+
``PGUP`` and so on. Unless they are explicitly bound to other function. This is
55+
in default input.conf and can be changed by user. ``KP_*`` with modifiers are
56+
only duplicated if they have a function bound to them.
57+
58+
By default, keypad keys are bound to their siblings, e.g. ``KP_PGUP`` is
59+
bound to ``PGUP``, unless they are explicitly bound to another function. This is
60+
defined in the default input.conf and can be changed by the user. ``KP_*`` bindings
61+
with modifiers are only duplicated if they have a function bound to them.
62+
5363
Keyboard Control
5464
----------------
5565

@@ -120,9 +130,6 @@ Q
120130
/ and *
121131
Decrease/increase volume.
122132

123-
KP_DIVIDE and KP_MULTIPLY
124-
Decrease/increase volume.
125-
126133
9 and 0
127134
Decrease/increase volume.
128135

@@ -177,9 +184,6 @@ L
177184
Ctrl++ and Ctrl+-
178185
Adjust audio delay (A/V sync) by +/- 0.1 seconds.
179186

180-
Ctrl+KP_ADD and Ctrl+KP_SUBTRACT
181-
Adjust audio delay (A/V sync) by +/- 0.1 seconds.
182-
183187
G and F
184188
Adjust subtitle font size by +/- 10%.
185189

@@ -237,9 +241,6 @@ Alt+LEFT, Alt+RIGHT, Alt+UP, Alt+DOWN
237241
Alt++ and Alt+-
238242
Change video zoom.
239243

240-
Alt+KP_ADD and Alt+KP_SUBTRACT
241-
Change video zoom.
242-
243244
Alt+BACKSPACE
244245
Reset the pan/zoom settings.
245246

etc/input.conf

+30-6
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
#ZOOMIN add video-zoom 0.1 # zoom in
6868
#Alt+- add video-zoom -0.1 # zoom out
6969
#ZOOMOUT add video-zoom -0.1 # zoom out
70-
#Alt+KP_ADD add video-zoom 0.1 # zoom in
71-
#Alt+KP_SUBTRACT add video-zoom -0.1 # zoom out
7270
#Ctrl+WHEEL_UP script-binding positioning/cursor-centric-zoom 0.1 # zoom in towards the cursor
7371
#Ctrl+WHEEL_DOWN script-binding positioning/cursor-centric-zoom -0.1 # zoom out towards the cursor
7472
#Alt+BS set video-zoom 0; no-osd set panscan 0; no-osd set video-pan-x 0; no-osd set video-pan-y 0; no-osd set video-align-x 0; no-osd set video-align-y 0 # reset zoom and pan settings
@@ -110,16 +108,12 @@
110108
#x add sub-delay +0.1 # delay subtitles by 100 ms
111109
#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio
112110
#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier
113-
#ctrl+KP_ADD add audio-delay 0.100 # change audio/video sync by delaying the audio
114-
#ctrl+KP_SUBTRACT add audio-delay -0.100 # change audio/video sync by shifting the audio earlier
115111
#G add sub-scale +0.1 # increase the subtitle font size
116112
#F add sub-scale -0.1 # decrease the subtitle font size
117113
#9 add volume -2
118114
#/ add volume -2
119-
#KP_DIVIDE add volume -2
120115
#0 add volume 2
121116
#* add volume 2
122-
#KP_MULTIPLY add volume 2
123117
#m cycle mute # toggle mute
124118
#1 add contrast -1
125119
#2 add contrast 1
@@ -232,6 +226,36 @@
232226
#Ctrl+KP_UP add video-align-y -0.01 # align video up
233227
#Ctrl+KP_PGUP add video-align-x 0.01; add video-align-y -0.01 # align video right and up
234228

229+
#
230+
# Aliases for keypad keys
231+
#
232+
#KP_ADD keypress +
233+
#KP_BEGIN keypress BEGIN
234+
#KP_DEC keypress ,
235+
#KP_DEL keypress DEL
236+
#KP_DIVIDE keypress /
237+
#KP_DOWN keypress DOWN
238+
#KP_END keypress END
239+
#KP_ENTER keypress ENTER
240+
#KP_HOME keypress HOME
241+
#KP_INS keypress INS
242+
#KP_LEFT keypress LEFT
243+
#KP_MULTIPLY keypress *
244+
#KP_PGDWN keypress PGDWN
245+
#KP_PGUP keypress PGUP
246+
#KP_RIGHT keypress RIGHT
247+
#KP_SUBTRACT keypress -
248+
#KP_UP keypress UP
249+
250+
#Alt+KP_ADD keypress Alt++
251+
#Alt+KP_SUBTRACT keypress Alt+-
252+
#Ctrl+KP_ADD keypress Ctrl++
253+
#Ctrl+KP_SUBTRACT keypress Ctrl+-
254+
#Shift+KP_END keypress Shift+END
255+
#Shift+KP_HOME keypress Shift+HOME
256+
#Shift+KP_PGDWN keypress Shift+PGDWN
257+
#Shift+KP_PGUP keypress Shift+PGUP
258+
235259
#
236260
# Legacy bindings (may or may not be removed in the future)
237261
#

0 commit comments

Comments
 (0)