You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>All mouse and keyboard input is to converted to mpv-specific key names. Key
11199
-
names are either special symbolic identifiers representing a physical key, or a
11200
-
text key names, which are unicode code points encoded as UTF-8. These are what
11201
-
keyboard input would normally produce, for example <tt class="docutils literal">a</tt> for the A key. As a
11202
-
consequence, mpv uses input translated by the current OS keyboard layout, rather
11203
-
than physical scan codes.</p>
11199
+
names are either special symbolic identifiers representing a physical key, or
11200
+
text key names, which are Unicode code points encoded as UTF-8. These are what
11201
+
keyboard input would normally produce, for example <tt class="docutils literal">a</tt> for the A key.
11202
+
These are influenced by keyboard modifiers which affect produced text, such as
11203
+
shift and caps lock. As a consequence, mpv uses input translated by the current
11204
+
OS keyboard layout, rather than physical scan codes.</p>
11204
11205
<p>Currently there is the hardcoded assumption that every text key can be
11205
-
represented as a single unicode code point (in NFKC form).</p>
11206
+
represented as a single Unicode code point (in NFKC form).</p>
11206
11207
<p>All key names can be combined with the modifiers <tt class="docutils literal">Shift</tt>, <tt class="docutils literal">Ctrl</tt>, <tt class="docutils literal">Alt</tt>,
11207
11208
<tt class="docutils literal">Meta</tt>. They must be prefixed to the actual key name, where each modifier
11208
11209
is followed by a <tt class="docutils literal">+</tt> (for example <tt class="docutils literal">ctrl+q</tt>).</p>
11209
-
<p>The <tt class="docutils literal">Shift</tt> modifier requires some attention. For instance <tt class="docutils literal">Shift+2</tt> should
11210
-
usually be specified as key-name <tt class="docutils literal">@</tt> at <tt class="docutils literal">input.conf</tt>, and similarly the
11211
-
combination <tt class="docutils literal">Alt+Shift+2</tt> is usually <tt class="docutils literal">Alt+@</tt>, etc. Special key names like
11212
-
<tt class="docutils literal">Shift+LEFT</tt> work as expected. If in doubt - use <tt class="docutils literal"><span class="pre">--input-test</span></tt> to check
11213
-
how a key/combination is seen by mpv.</p>
11210
+
<div class="admonition note">
11211
+
<p class="first admonition-title">Note</p>
11212
+
<p>The <tt class="docutils literal">Shift</tt> modifier requires some attention. In general, when the
11213
+
<tt class="docutils literal">Shift</tt> modifier is combined with a key which produces text, the actual
11214
+
produced text key name when shift is pressed should be used.</p>
11215
+
<p>For instance, on the US keyboard layout, <tt class="docutils literal">Shift+2</tt> should usually be
11216
+
specified as key-name <tt class="docutils literal">@</tt> at <tt class="docutils literal">input.conf</tt>, and similarly the
11217
+
combination <tt class="docutils literal">Alt+Shift+2</tt> is usually <tt class="docutils literal">Alt+@</tt>, etc.</p>
11218
+
<p>In general, the <tt class="docutils literal">Shift</tt> modifier, when specified with text key names,
11219
+
is ignored: for instance, mpv interprets <tt class="docutils literal">Shift+2</tt> as <tt class="docutils literal">2</tt>.
11220
+
The only exceptions are ASCII letters, which are normalized by mpv.
11221
+
For example, <tt class="docutils literal">Shift+a</tt> is interpreted as <tt class="docutils literal">A</tt>.</p>
11222
+
<p class="last">Special key names like <tt class="docutils literal">Shift+LEFT</tt> work as expected.
11223
+
If in doubt - use <tt class="docutils literal"><span class="pre">--input-test</span></tt> to check how a key/combination is seen
11224
+
by mpv.</p>
11225
+
</div>
11214
11226
<p>Symbolic key names and modifier names are case-insensitive. Unicode key names
11215
-
are case-sensitive because input bindings typically respect the shift key.</p>
11216
-
<p>Another type of key names are hexadecimal key names, that serve as fallback
11217
-
for special keys that are neither unicode, nor have a special mpv defined name.
11218
-
They will break as soon as mpv adds proper names for them, but can enable you
11219
-
to use a key at all if that does not happen.</p>
11227
+
are case-sensitive just like how keyboard text input would produce.</p>
11228
+
<p>Another type of key names are hexadecimal key names, which start with <tt class="docutils literal">0x</tt>,
11229
+
followed by the hexadecimal value of the key. The hexadecimal value can be
11230
+
either a Unicode code point value, or can serve as fallback for special keys
11231
+
that do not have a special mpv defined name. They will break as soon as mpv
11232
+
adds proper names for them, but can enable you to use a key at all if that
11233
+
does not happen.</p>
11220
11234
<p>All symbolic names are listed by <tt class="docutils literal"><span class="pre">--input-keylist</span></tt>. <tt class="docutils literal"><span class="pre">--input-test</span></tt> is a
11221
11235
special mode that prints all input on the OSD.</p>
11222
11236
<p>Comments on some symbolic names:</p>
@@ -15730,7 +15744,6 @@ <h2>Commands</h2>
15730
15744
<div class="section" id="known-issues">
15731
15745
<h2>Known issues</h2>
15732
15746
<ul class="simple">
15733
-
<li>Pasting text is slow on Windows</li>
15734
15747
<li>Non-ASCII keyboard input has restrictions</li>
15735
15748
<li>The cursor keys move between Unicode code-points, not grapheme clusters</li>
0 commit comments