From a394d9e3aeadb0a2dedd7c15d8322252742b2fe4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 21 Nov 2019 22:30:45 +0100 Subject: manpage: improve "complex" key binding list of table entries --- DOCS/man/lua.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 5f9525d6b6..13cd3dbad0 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -251,12 +251,19 @@ The ``mp`` module is preloaded, although it can be loaded manually with ``complex`` If set to ``true``, then ``fn`` is called on both key up and down events (as well as key repeat, if enabled), with the first - argument being a table. This table has an ``event`` entry, which - is set to one of the strings ``down``, ``repeat``, ``up`` or - ``press`` (the latter if key up/down can't be tracked). The - ``is_mouse`` entry tells whether the event was caused by a mouse - button. The ``key_name`` entry contains the name of they key that - triggered this, or ``nil`` if unknown or invoked artificially. + argument being a table. This table has the following entries (and + may contain undocumented ones): + + ``event`` + Set to one of the strings ``down``, ``repeat``, ``up`` or + ``press`` (the latter if key up/down can't be tracked). + + ``is_mouse`` + Boolean Whether the event was caused by a mouse button. + + ``key_name`` + The name of they key that triggered this, or ``nil`` if unknown + or invoked artificially. Internally, key bindings are dispatched via the ``script-message-to`` or ``script-binding`` input commands and ``mp.register_script_message``. -- cgit v1.2.3