summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-06 00:31:47 +0200
committerwm4 <wm4@nowhere>2015-08-06 00:31:47 +0200
commitd6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f (patch)
treecc31efc6ab85fef7e30c3a560c2d691b60ff4528 /DOCS
parentcaebbded67195d7f234e620cadc25ec276f4abcc (diff)
downloadmpv-d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f.tar.bz2
mpv-d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f.tar.xz
lua: implement input_enable_section/input_disable_section via commands
Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/input.rst17
1 files changed, 13 insertions, 4 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 58413d54e3..530bb8f4dd 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -499,7 +499,7 @@ Input Commands that are Possibly Subject to Change
Note that there is a static limit of (as of this writing) 10 arguments
(this limit could be raised on demand).
-``enable_section "<section>" [default|exclusive]``
+``enable_section "<section>" [flags]``
Enable all key bindings in the named input section.
The enabled input sections form a stack. Bindings in sections on the top of
@@ -508,9 +508,18 @@ Input Commands that are Possibly Subject to Change
implicitly removed beforehand. (A section cannot be on the stack more than
once.)
- If ``exclusive`` is specified as second argument, all sections below the
- newly enabled section are disabled. They will be re-enabled as soon as
- all exclusive sections above them are removed.
+ The ``flags`` parameter can be a combination (separated by ``+``) of the
+ following flags:
+
+ <exclusive>
+ All sections enabled before the newly enabled section are disabled.
+ They will be re-enabled as soon as all exclusive sections above them
+ are removed. In other words, the new section shadows all previous
+ sections.
+ <allow-hide-cursor>
+ This feature can't be used through the public API.
+ <allow-vo-dragging>
+ Same.
``disable_section "<section>"``
Disable the named input section. Undoes ``enable_section``.