From d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 6 Aug 2015 00:31:47 +0200 Subject: 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. --- DOCS/man/input.rst | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'DOCS') 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 "
" [default|exclusive]`` +``enable_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: + + + 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. + + This feature can't be used through the public API. + + Same. ``disable_section "
"`` Disable the named input section. Undoes ``enable_section``. -- cgit v1.2.3