Skip to content

Commit ad59ff1

Browse files
na-na-hikasper93
authored andcommitted
DOCS/man/input: document command-list contents
Forgotten in 029bb59.
1 parent 0a53407 commit ad59ff1

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

DOCS/man/input.rst

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4046,11 +4046,42 @@ Property list
40464046

40474047
``command-list``
40484048
The list of input commands. This returns an array of maps, where each map
4049-
node represents a command. This map currently only has a single entry:
4050-
``name`` for the name of the command. (This property is supposed to be a
4051-
replacement for ``--input-cmdlist``. The option dumps some more
4052-
information, but it's a valid feature request to extend this property if
4053-
needed.)
4049+
node represents a command. This map has the following entries:
4050+
4051+
``name``
4052+
The name of the command.
4053+
4054+
``vararg``
4055+
Whether the command accepts a variable number of arguments.
4056+
4057+
``args``
4058+
An array of maps, where each map node represents an argument with the
4059+
following entries:
4060+
4061+
``name``
4062+
The name of the argument.
4063+
4064+
``type``
4065+
The name of the argument type, like ``String`` or ``Integer``.
4066+
4067+
``optional``
4068+
Whether the argument is optional.
4069+
4070+
When querying the property with the client API using ``MPV_FORMAT_NODE``,
4071+
or with Lua ``mp.get_property_native``, this will return a mpv_node with
4072+
the following contents:
4073+
4074+
::
4075+
4076+
MPV_FORMAT_NODE_ARRAY
4077+
MPV_FORMAT_NODE_MAP (for each command entry)
4078+
"name" MPV_FORMAT_STRING
4079+
"vararg" MPV_FORMAT_FLAG
4080+
"args" MPV_FORMAT_NODE_ARRAY
4081+
MPV_FORMAT_NODE_MAP
4082+
"name" MPV_FORMAT_STRING
4083+
"type" MPV_FORMAT_STRING
4084+
"optional" MPV_FORMAT_FLAG
40544085

40554086
``input-bindings``
40564087
The list of current input key bindings. This returns an array of maps,

0 commit comments

Comments
 (0)