summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-05 23:55:16 +0200
committerwm4 <wm4@nowhere>2015-08-06 00:16:45 +0200
commitd1179f95011103a1e3aa9bacd270e82935370f88 (patch)
tree341be84a7aae32baac3b534ee5ae5d18c6acc85c /input
parentbeb4f8316aca2f206ce1ea743498b4241670c37d (diff)
downloadmpv-d1179f95011103a1e3aa9bacd270e82935370f88.tar.bz2
mpv-d1179f95011103a1e3aa9bacd270e82935370f88.tar.xz
command: add a command for defining input bindings
This was requested. It was more or less present internally already and used for Lua scripting. Lua will switch to the "public" functions in the following commits.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_list.c6
-rw-r--r--input/cmd_list.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c
index b1db2e4f0c..250f451955 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -166,6 +166,12 @@ const struct mp_cmd_def mp_cmds[] = {
{"exclusive", 1})),
}},
{ MP_CMD_DISABLE_INPUT_SECTION, "disable-section", { ARG_STRING } },
+ { MP_CMD_DEFINE_INPUT_SECTION, "define-section", {
+ ARG_STRING,
+ ARG_STRING,
+ OARG_CHOICE(1, ({"default", 1},
+ {"force", 0})),
+ }},
{ MP_CMD_AB_LOOP, "ab-loop", },
diff --git a/input/cmd_list.h b/input/cmd_list.h
index a41807f9fe..c8c0dc3593 100644
--- a/input/cmd_list.h
+++ b/input/cmd_list.h
@@ -79,6 +79,7 @@ enum mp_command_type {
MP_CMD_ENABLE_INPUT_SECTION,
MP_CMD_DISABLE_INPUT_SECTION,
+ MP_CMD_DEFINE_INPUT_SECTION,
MP_CMD_AB_LOOP,