diff options
author | wm4 <wm4@nowhere> | 2014-11-20 23:59:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-21 00:01:59 +0100 |
commit | 00626817c8ac4e91f95141fdc7f8cf39c38f820d (patch) | |
tree | c586aeabc6fab9fec6c010f9f377dbd58bb6f498 /DOCS | |
parent | 0a78a61d897918c1f013a3d7d308c5a3939c53cc (diff) | |
download | mpv-00626817c8ac4e91f95141fdc7f8cf39c38f820d.tar.bz2 mpv-00626817c8ac4e91f95141fdc7f8cf39c38f820d.tar.xz |
lua: add a way to add repeatable key bindings
For these, autorepeat is enabled.
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/man/lua.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index fbba495a4f..e01754b3ef 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -181,7 +181,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with Return the current mpv internal time in seconds as a number. This is basically the system time, with an arbitrary offset. -``mp.add_key_binding(key, name|fn [,fn])`` +``mp.add_key_binding(key, name|fn [,fn [,flags]])`` Register callback to be run on a key binding. The binding will be mapped to the given ``key``, which is a string describing the physical key. This uses the same key names as in input.conf, and also allows combinations @@ -198,6 +198,10 @@ The ``mp`` module is preloaded, although it can be loaded manually with overwritten. You can omit the name, in which case a random name is generated internally. + The last argument is used for additional flags. Currently, this includes + the string ``repeatable``, which enables key repeat for this specific + binding. + Internally, key bindings are dispatched via the ``script_message_to`` input command and ``mp.register_script_message``. |