Skip to content

Commit

Permalink
DOCS/man/lua.rst: document custom arg for mp.add_key_binding()
Browse files Browse the repository at this point in the history
  • Loading branch information
na-na-hi committed Nov 18, 2024
1 parent 7204cd9 commit e048078
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DOCS/man/lua.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ The ``mp`` module is preloaded, although it can be loaded manually with
or pass the ``fn`` argument in place of the name. The latter is not
recommended and is handled for compatibility only.)

The last argument is used for optional flags. This is a table, which can
have the following entries:
The ``flags`` argument is used for optional parameters. This is a table,
which can have the following entries:

``repeatable``
If set to ``true``, enables key repeat for this specific binding.
Expand Down Expand Up @@ -358,6 +358,11 @@ The ``mp`` module is preloaded, although it can be loaded manually with
The scale of the key, such as the ones produced by ``WHEEL_*``
keys. The scale is 1 if the key is nonscalable.

``arg``
User-provided string in the ``arg`` argument in the
``script-binding`` command if the key binding is invoked
by that command.

Internally, key bindings are dispatched via the ``script-message-to`` or
``script-binding`` input commands and ``mp.register_script_message``.

Expand Down

0 comments on commit e048078

Please sign in to comment.