summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c
index c0c5b57cd8..dd3e0b33c4 100644
--- a/input/input.c
+++ b/input/input.c
@@ -175,6 +175,7 @@ struct input_opts {
int use_media_keys;
int default_bindings;
int enable_mouse_movements;
+ int x11_key_input;
int test;
};
@@ -195,6 +196,7 @@ const struct m_sub_options input_config = {
OPT_FLAG("right-alt-gr", use_alt_gr, CONF_GLOBAL),
OPT_INTRANGE("key-fifo-size", key_fifo_size, CONF_GLOBAL, 2, 65000),
OPT_FLAG("cursor", enable_mouse_movements, CONF_GLOBAL),
+ OPT_FLAG("x11-keyboard", x11_key_input, CONF_GLOBAL),
#if HAVE_LIRC
OPT_STRING("lirc-conf", lirc_configfile, CONF_GLOBAL),
#endif
@@ -218,6 +220,7 @@ const struct m_sub_options input_config = {
.use_media_keys = 1,
#endif
.default_bindings = 1,
+ .x11_key_input = 1,
},
};
@@ -706,6 +709,14 @@ bool mp_input_mouse_enabled(struct input_ctx *ictx)
return r;
}
+bool mp_input_x11_keyboard_enabled(struct input_ctx *ictx)
+{
+ input_lock(ictx);
+ bool r = ictx->opts->x11_key_input;
+ input_unlock(ictx);
+ return r;
+}
+
void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y)
{
input_lock(ictx);