@@ -5750,6 +5750,12 @@ <h2>OSD</h2>
5750
5750
<dt><tt class="docutils literal"><span class="pre">--osd-color=<color></span></tt></dt>
5751
5751
<dd>Specify the color used for OSD.
5752
5752
See <tt class="docutils literal"><span class="pre">--sub-color</span></tt> for details.</dd>
5753
+ <dt><tt class="docutils literal"><span class="pre">--osd-selected-color=<color></span></tt></dt>
5754
+ <dd>The color of the selected item in lists.
5755
+ See <tt class="docutils literal"><span class="pre">--sub-color</span></tt> for details.</dd>
5756
+ <dt><tt class="docutils literal"><span class="pre">--osd-selected-outline-color=<color></span></tt></dt>
5757
+ <dd>The outline color of the selected item in lists.
5758
+ See <tt class="docutils literal"><span class="pre">--sub-color</span></tt> for details.</dd>
5753
5759
<dt><tt class="docutils literal"><span class="pre">--osd-fractions</span></tt></dt>
5754
5760
<dd>Show OSD times with fractions of seconds (in millisecond precision). Useful
5755
5761
to see the exact timestamp of a video frame.</dd>
@@ -8828,6 +8834,19 @@ <h2>Miscellaneous</h2>
8828
8834
code is the same.)</p>
8829
8835
<p class="last">Conversion is not applied to metadata that is updated at runtime.</p>
8830
8836
</dd>
8837
+ <dt><tt class="docutils literal"><span class="pre">--clipboard-enable=<yes|no></span></tt></dt>
8838
+ <dd><p class="first">(Windows and Wayland only)</p>
8839
+ <p class="last">Enable native clipboard support (default: yes). This allows reading and
8840
+ writing to the <tt class="docutils literal">clipboard</tt> property to get and set clipboard contents.</p>
8841
+ </dd>
8842
+ <dt><tt class="docutils literal"><span class="pre">--clipboard-monitor=<yes|no></span></tt></dt>
8843
+ <dd><p class="first">(Windows only)</p>
8844
+ <p class="last">Enable clipboard monitoring so that the <tt class="docutils literal">clipboard</tt> property can be
8845
+ observed for content changes (default: no). This only affects clipboard
8846
+ implementations which use polling to monitor clipboard updates.
8847
+ Other platforms currently ignore this option and always/never notify
8848
+ changes.</p>
8849
+ </dd>
8831
8850
</dl>
8832
8851
</div>
8833
8852
</div>
@@ -11192,7 +11211,10 @@ <h2>Key names</h2>
11192
11211
<p class="last"><tt class="docutils literal">MBTN*</tt> are aliases for <tt class="docutils literal">MOUSE_BTN*</tt>.</p>
11193
11212
</dd>
11194
11213
<dt><tt class="docutils literal">WHEEL_*</tt></dt>
11195
- <dd>Mouse wheels (typically).</dd>
11214
+ <dd><p class="first">Mouse wheels and touch pads (typically).</p>
11215
+ <p class="last">These key are scalable when used with scalable commands if the underlying
11216
+ device supports high-resolution scrolling (e.g. touch pads).</p>
11217
+ </dd>
11196
11218
<dt><tt class="docutils literal">AXIS_*</tt></dt>
11197
11219
<dd>Deprecated aliases for <tt class="docutils literal">WHEEL_*</tt>.</dd>
11198
11220
<dt><tt class="docutils literal">*_DBL</tt></dt>
@@ -11320,9 +11342,11 @@ <h3>Playback Control</h3>
11320
11342
<p>By default, <tt class="docutils literal">keyframes</tt> is used for <tt class="docutils literal">relative</tt>, <tt class="docutils literal"><span class="pre">relative-percent</span></tt>,
11321
11343
and <tt class="docutils literal"><span class="pre">absolute-percent</span></tt> seeks, while <tt class="docutils literal">exact</tt> is used for <tt class="docutils literal">absolute</tt>
11322
11344
seeks.</p>
11323
- <p class="last" >Before mpv 0.9, the <tt class="docutils literal">keyframes</tt> and <tt class="docutils literal">exact</tt> flags had to be passed as
11345
+ <p>Before mpv 0.9, the <tt class="docutils literal">keyframes</tt> and <tt class="docutils literal">exact</tt> flags had to be passed as
11324
11346
3rd parameter (essentially using a space instead of <tt class="docutils literal">+</tt>). The 3rd
11325
11347
parameter is still parsed, but is considered deprecated.</p>
11348
+ <p class="last">This is a scalable command. See the documentation of <tt class="docutils literal">nonscalable</tt> input
11349
+ command prefix in <a class="reference internal" href="#input-command-prefixes">Input Command Prefixes</a> for details.</p>
11326
11350
</dd>
11327
11351
<dt><tt class="docutils literal"><span class="pre">revert-seek</span> [<flags>]</tt></dt>
11328
11352
<dd><p class="first">Undoes the <tt class="docutils literal">seek</tt> command, and some other commands that seek (but not
@@ -11395,8 +11419,11 @@ <h3>Property Manipulation</h3>
11395
11419
<dt><tt class="docutils literal">del <name></tt></dt>
11396
11420
<dd>Delete the given property. Most properties cannot be deleted.</dd>
11397
11421
<dt><tt class="docutils literal">add <name> [<value>]</tt></dt>
11398
- <dd>Add the given value to the property or option. On overflow or underflow,
11399
- clamp the property to the maximum. If <tt class="docutils literal"><value></tt> is omitted, assume <tt class="docutils literal">1</tt>.</dd>
11422
+ <dd><p class="first">Add the given value to the property or option. On overflow or underflow,
11423
+ clamp the property to the maximum. If <tt class="docutils literal"><value></tt> is omitted, assume <tt class="docutils literal">1</tt>.</p>
11424
+ <p class="last">This is a scalable command. See the documentation of <tt class="docutils literal">nonscalable</tt> input
11425
+ command prefix in <a class="reference internal" href="#input-command-prefixes">Input Command Prefixes</a> for details.</p>
11426
+ </dd>
11400
11427
<dt><tt class="docutils literal">multiply <name> <value></tt></dt>
11401
11428
<dd>Similar to <tt class="docutils literal">add</tt>, but multiplies the property or option with the numeric
11402
11429
value.</dd>
@@ -11405,9 +11432,11 @@ <h3>Property Manipulation</h3>
11405
11432
<tt class="docutils literal">down</tt> to set the cycle direction. On overflow, set the property back to
11406
11433
the minimum, on underflow set it to the maximum. If <tt class="docutils literal">up</tt> or <tt class="docutils literal">down</tt> is
11407
11434
omitted, assume <tt class="docutils literal">up</tt>.</p>
11408
- <p class="last" >Whether or not key-repeat is enabled by default depends on the property.
11435
+ <p>Whether or not key-repeat is enabled by default depends on the property.
11409
11436
Currently properties with continuous values are repeatable by default (like
11410
11437
<tt class="docutils literal">volume</tt>), while discrete values are not (like <tt class="docutils literal"><span class="pre">osd-level</span></tt>).</p>
11438
+ <p class="last">This is a scalable command. See the documentation of <tt class="docutils literal">nonscalable</tt> input
11439
+ command prefix in <a class="reference internal" href="#input-command-prefixes">Input Command Prefixes</a> for details.</p>
11411
11440
</dd>
11412
11441
<dt><tt class="docutils literal"><span class="pre">cycle-values</span> <span class="pre">[<"!reverse">]</span> <property> <value1> [<value2> <span class="pre">[...]]</span></tt></dt>
11413
11442
<dd><p class="first">Cycle through a list of values. Each invocation of the command will set the
@@ -12201,23 +12230,28 @@ <h3>Scripting Commands</h3>
12201
12230
<p class="last">This command has a variable number of arguments, and cannot be used with
12202
12231
named arguments.</p>
12203
12232
</dd>
12204
- <dt><tt class="docutils literal"><span class="pre">script-binding</span> <name></tt></dt>
12233
+ <dt><tt class="docutils literal"><span class="pre">script-binding</span> <name> [<arg>] </tt></dt>
12205
12234
<dd><p class="first">Invoke a script-provided key binding. This can be used to remap key
12206
12235
bindings provided by external Lua scripts.</p>
12207
- <p>The argument is the name of the binding.</p>
12236
+ <p><tt class="docutils literal"><name></tt> is the name of the binding. <tt class="docutils literal"><arg></tt> is a user-provided
12237
+ arbitrary string which can be used to provide extra information.</p>
12208
12238
<p>It can optionally be prefixed with the name of the script, using <tt class="docutils literal">/</tt> as
12209
12239
separator, e.g. <tt class="docutils literal"><span class="pre">script-binding</span> scriptname/bindingname</tt>. Note that script
12210
12240
names only consist of alphanumeric characters and <tt class="docutils literal">_</tt>.</p>
12211
12241
<p>For completeness, here is how this command works internally. The details
12212
12242
could change any time. On any matching key event, <tt class="docutils literal"><span class="pre">script-message-to</span></tt>
12213
12243
or <tt class="docutils literal"><span class="pre">script-message</span></tt> is called (depending on whether the script name is
12214
- included), with the following arguments:</p>
12244
+ included), with the following arguments in string format :</p>
12215
12245
<ol class="arabic simple">
12216
12246
<li>The string <tt class="docutils literal"><span class="pre">key-binding</span></tt>.</li>
12217
12247
<li>The name of the binding (as established above).</li>
12218
12248
<li>The key state as string (see below).</li>
12219
12249
<li>The key name (since mpv 0.15.0).</li>
12220
12250
<li>The text the key would produce, or empty string if not applicable.</li>
12251
+ <li>The scale of the key, such as the ones produced by <tt class="docutils literal">WHEEL_*</tt> keys.
12252
+ The scale is 1 if the key is nonscalable.</li>
12253
+ <li>The user-provided string <tt class="docutils literal"><arg></tt>, or empty string if the argument is
12254
+ not used.</li>
12221
12255
</ol>
12222
12256
<p>The 5th argument is only set if no modifiers are present (using the shift
12223
12257
key with a letter is normally not emitted as having a modifier, and results
@@ -12233,8 +12267,10 @@ <h3>Scripting Commands</h3>
12233
12267
released but not physically released), either <tt class="docutils literal">c</tt> (canceled) or <tt class="docutils literal">-</tt>
12234
12268
(something else). Not all types of cancellations set this flag.</li>
12235
12269
</ol>
12236
- <p class="last" >Future versions can add more arguments and more key state characters to
12270
+ <p>Future versions can add more arguments and more key state characters to
12237
12271
support more input peculiarities.</p>
12272
+ <p class="last">This is a scalable command. See the documentation of <tt class="docutils literal">nonscalable</tt> input
12273
+ command prefix in <a class="reference internal" href="#input-command-prefixes">Input Command Prefixes</a> for details.</p>
12238
12274
</dd>
12239
12275
<dt><tt class="docutils literal"><span class="pre">load-script</span> <filename></tt></dt>
12240
12276
<dd><p class="first">Load a script, similar to the <tt class="docutils literal"><span class="pre">--script</span></tt> option. Whether this waits for
@@ -12468,8 +12504,9 @@ <h3>Miscellaneous Commands</h3>
12468
12504
<dd>Begin window dragging if supported by the current VO. This command should
12469
12505
only be called while a mouse button is being pressed, otherwise it will
12470
12506
be ignored. The exact effect of this command depends on the VO implementation
12471
- of window dragging. For example, on Windows only the left mouse button can
12472
- begin window dragging, while X11 and Wayland allow other mouse buttons.</dd>
12507
+ of window dragging. For example, on Windows and macOS only the left mouse
12508
+ button can begin window dragging, while X11 and Wayland allow other mouse
12509
+ buttons.</dd>
12473
12510
<dt><tt class="docutils literal"><span class="pre">context-menu</span></tt></dt>
12474
12511
<dd>Show context menu on the video window. See <a class="reference internal" href="#context-menu">Context Menu</a> section for details.</dd>
12475
12512
</dl>
@@ -14451,6 +14488,23 @@ <h2>Property list</h2>
14451
14488
</dl>
14452
14489
<p class="last">This property is read-only, and change notification is not supported.</p>
14453
14490
</dd>
14491
+ <dt><tt class="docutils literal">clipboard</tt></dt>
14492
+ <dd><p class="first">The clipboard contents, only works when native clipboard
14493
+ (<tt class="docutils literal"><span class="pre">--clipboard-enable</span></tt>) is supported on the platform.
14494
+ Depending on the platform, some sub-properties, writing to properties,
14495
+ or change notifications are not currently functional.</p>
14496
+ <p>This has a number of sub-properties:</p>
14497
+ <dl class="docutils">
14498
+ <dt><tt class="docutils literal">clipboard/text</tt> (RW)</dt>
14499
+ <dd>The text content in the clipboard (Windows and Wayland only).
14500
+ Writing to this property sets the text clipboard content (Windows only).</dd>
14501
+ </dl>
14502
+ <div class="admonition note last">
14503
+ <p class="first admonition-title">Note</p>
14504
+ <p class="last">On Wayland, the clipboard content is only updated when the compositor
14505
+ sends a selection data offer (typically when VO window is focused).</p>
14506
+ </div>
14507
+ </dd>
14454
14508
</dl>
14455
14509
</div>
14456
14510
<div class="section" id="inconsistencies-between-options-and-properties">
@@ -14662,13 +14716,13 @@ <h3>The Interface</h3>
14662
14716
</colgroup>
14663
14717
<tbody valign="top">
14664
14718
<tr><td>left-click</td>
14665
- <td>open the playlist selector </td>
14719
+ <td>show file and track info </td>
14666
14720
</tr>
14667
14721
<tr><td>middle-click</td>
14668
14722
<td>show the filename</td>
14669
14723
</tr>
14670
14724
<tr><td>right-click</td>
14671
- <td>show file and track info </td>
14725
+ <td>open the playlist selector </td>
14672
14726
</tr>
14673
14727
</tbody>
14674
14728
</table>
@@ -14797,16 +14851,16 @@ <h3>The Interface</h3>
14797
14851
</colgroup>
14798
14852
<tbody valign="top">
14799
14853
<tr><td>left-click</td>
14800
- <td>open the audio/sub track selector </td>
14854
+ <td>cycle audio/sub tracks forward </td>
14801
14855
</tr>
14802
14856
<tr><td>shift+L-click</td>
14803
- <td>show available audio/sub tracks</td>
14857
+ <td>cycle audio/sub tracks backwards </td>
14804
14858
</tr>
14805
14859
<tr><td>middle-click</td>
14806
14860
<td>show available audio/sub tracks</td>
14807
14861
</tr>
14808
14862
<tr><td>right-click</td>
14809
- <td>show available audio/sub tracks </td>
14863
+ <td>open the audio/sub track selector </td>
14810
14864
</tr>
14811
14865
<tr><td>mouse wheel</td>
14812
14866
<td>cycle audio/sub tracks forward/backwards</td>
@@ -15168,9 +15222,9 @@ <h3>Configurable Options</h3>
15168
15222
</dl>
15169
15223
<p>The following options configure what commands are run when the buttons are
15170
15224
clicked. <tt class="docutils literal">mbtn_mid</tt> commands are also triggered with <tt class="docutils literal">shift+mbtn_left</tt>.</p>
15171
- <p><tt class="docutils literal"><span class="pre">title_mbtn_left_command=script-binding</span> <span class="pre">select/select-playlist;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide </span></tt></p>
15225
+ <p><tt class="docutils literal"><span class="pre">title_mbtn_left_command=script-binding</span> <span class="pre">stats/display-page-5 </span></tt></p>
15172
15226
<p><tt class="docutils literal"><span class="pre">title_mbtn_mid_command=show-text</span> ${filename}</tt></p>
15173
- <p><tt class="docutils literal"><span class="pre">title_mbtn_right_command=script-binding</span> <span class="pre">stats/display-page-5 </span></tt></p>
15227
+ <p><tt class="docutils literal"><span class="pre">title_mbtn_right_command=script-binding</span> <span class="pre">select/select-playlist;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide </span></tt></p>
15174
15228
<p><tt class="docutils literal"><span class="pre">playlist_prev_mbtn_left_command=playlist-prev;</span> <span class="pre">show-text</span> ${playlist} 3000</tt></p>
15175
15229
<p><tt class="docutils literal"><span class="pre">playlist_prev_mbtn_mid_command=show-text</span> ${playlist} 3000</tt></p>
15176
15230
<p><tt class="docutils literal"><span class="pre">playlist_prev_mbtn_right_command=show-text</span> ${playlist} 3000</tt></p>
@@ -15186,14 +15240,14 @@ <h3>Configurable Options</h3>
15186
15240
<p><tt class="docutils literal"><span class="pre">chapter_next_mbtn_left_command=osd-msg</span> add chapter 1</tt></p>
15187
15241
<p><tt class="docutils literal"><span class="pre">chapter_next_mbtn_mid_command=show-text</span> <span class="pre">${chapter-list}</span> 3000</tt></p>
15188
15242
<p><tt class="docutils literal"><span class="pre">chapter_next_mbtn_right_command=script-binding</span> <span class="pre">select/select-chapter;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide</span></tt></p>
15189
- <p><tt class="docutils literal"><span class="pre"> audio_track_mbtn_left_command=script-binding</span> <span class="pre">select/select-aid;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide</span> </tt></p>
15190
- <p><tt class="docutils literal"><span class="pre"> audio_track_mbtn_mid_command=show-text</span> <span class="pre">${track-list/ audio}</span> 3000 </tt></p>
15191
- <p><tt class="docutils literal">audio_track_mbtn_right_command=cycle audio </tt></p>
15243
+ <p><tt class="docutils literal">audio_track_mbtn_left_command=cycle audio </tt></p>
15244
+ <p><tt class="docutils literal">audio_track_mbtn_mid_command=cycle audio down </tt></p>
15245
+ <p><tt class="docutils literal"><span class="pre"> audio_track_mbtn_right_command=script-binding</span> <span class="pre">select/select-aid;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide</span> </tt></p>
15192
15246
<p><tt class="docutils literal">audio_track_wheel_down_command=cycle audio</tt></p>
15193
15247
<p><tt class="docutils literal">audio_track_wheel_up_command=cycle audio down</tt></p>
15194
- <p><tt class="docutils literal"><span class="pre"> sub_track_mbtn_left_command=script-binding</span> <span class="pre">select/select-sid;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide</span> </tt></p>
15195
- <p><tt class="docutils literal"><span class="pre"> sub_track_mbtn_mid_command=show-text</span> <span class="pre">${track-list/ sub}</span> 3000 </tt></p>
15196
- <p><tt class="docutils literal">sub_track_mbtn_right_command=cycle sub </tt></p>
15248
+ <p><tt class="docutils literal">sub_track_mbtn_left_command=cycle sub </tt></p>
15249
+ <p><tt class="docutils literal">sub_track_mbtn_mid_command=cycle sub down </tt></p>
15250
+ <p><tt class="docutils literal"><span class="pre"> sub_track_mbtn_right_command=script-binding</span> <span class="pre">select/select-sid;</span> <span class="pre">script-message-to</span> osc <span class="pre">osc-hide</span> </tt></p>
15197
15251
<p><tt class="docutils literal">sub_track_wheel_down_command=cycle sub</tt></p>
15198
15252
<p><tt class="docutils literal">sub_track_wheel_up_command=cycle sub down</tt></p>
15199
15253
<p><tt class="docutils literal"><span class="pre">volume_mbtn_left_command=no-osd</span> cycle mute</tt></p>
@@ -15970,13 +16024,19 @@ <h2>mp functions</h2>
15970
16024
internally. (Omitting works as follows: either pass <tt class="docutils literal">nil</tt> for <tt class="docutils literal">name</tt>,
15971
16025
or pass the <tt class="docutils literal">fn</tt> argument in place of the name. The latter is not
15972
16026
recommended and is handled for compatibility only.)</p>
15973
- <p>The last argument is used for optional flags . This is a table, which can
15974
- have the following entries:</p>
16027
+ <p>The <tt class="docutils literal">flags</tt> argument is used for optional parameters . This is a table,
16028
+ which can have the following entries:</p>
15975
16029
<blockquote>
15976
16030
<dl class="docutils">
15977
16031
<dt><tt class="docutils literal">repeatable</tt></dt>
15978
16032
<dd>If set to <tt class="docutils literal">true</tt>, enables key repeat for this specific binding.
15979
16033
This option only makes sense when <tt class="docutils literal">complex</tt> is not set to <tt class="docutils literal">true</tt>.</dd>
16034
+ <dt><tt class="docutils literal">scalable</tt></dt>
16035
+ <dd>If set to <tt class="docutils literal">true</tt>, enables key scaling for this specific binding.
16036
+ This option only makes sense when <tt class="docutils literal">complex</tt> is set to <tt class="docutils literal">true</tt>.
16037
+ Note that this has no effect if the key binding is invoked by
16038
+ <tt class="docutils literal"><span class="pre">script-binding</span></tt> command, where the scalability of the command
16039
+ takes precedence.</dd>
15980
16040
<dt><tt class="docutils literal">complex</tt></dt>
15981
16041
<dd><p class="first">If set to <tt class="docutils literal">true</tt>, then <tt class="docutils literal">fn</tt> is called on key down, repeat and up
15982
16042
events, with the first argument being a table. This table has the
@@ -16000,6 +16060,13 @@ <h2>mp functions</h2>
16000
16060
<dd>Text if triggered by a text key, otherwise <tt class="docutils literal">nil</tt>. See
16001
16061
description of <tt class="docutils literal"><span class="pre">script-binding</span></tt> command for details (this
16002
16062
field is equivalent to the 5th argument).</dd>
16063
+ <dt><tt class="docutils literal">scale</tt></dt>
16064
+ <dd>The scale of the key, such as the ones produced by <tt class="docutils literal">WHEEL_*</tt>
16065
+ keys. The scale is 1 if the key is nonscalable.</dd>
16066
+ <dt><tt class="docutils literal">arg</tt></dt>
16067
+ <dd>User-provided string in the <tt class="docutils literal">arg</tt> argument in the
16068
+ <tt class="docutils literal"><span class="pre">script-binding</span></tt> command if the key binding is invoked
16069
+ by that command.</dd>
16003
16070
</dl>
16004
16071
</blockquote>
16005
16072
</dd>
0 commit comments