0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

input: don't print warning if certain internal keys are not bound

This affects MOUSE_MOVE and MOUSE_LEAVE. Both are needed internally
(such as for the OSC), but not really useful for input.conf. Since the
warning has the purpose of notifying the user that a key is unmapped and
what key name to use for setting up a binding in input.conf, the warning
is rather useless in this case. It's also annoying in combination with
the
--no-input-default-bindings option, since that removes the default
bindings to "ignore" for these keys.
This commit is contained in:
wm4 2013-09-06 00:28:31 +02:00
parent af83cac9b8
commit db79db8444
2 changed files with 5 additions and 6 deletions

View File

@ -185,10 +185,6 @@
#JOY_BTN2 add volume 1 #JOY_BTN2 add volume 1
#JOY_BTN3 add volume -1 #JOY_BTN3 add volume -1
# Mostly for internal purposes
#MOUSE_MOVE ignore
#MOUSE_LEAVE ignore
# #
# Not assigned by default # Not assigned by default
# (not an exhaustive list of unbound commands) # (not an exhaustive list of unbound commands)

View File

@ -1363,9 +1363,12 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, char *force_section,
} }
if (cmd == NULL) { if (cmd == NULL) {
int msgl = MSGL_WARN;
if (n == 1 && (keys[0] == MP_KEY_MOUSE_MOVE ||
keys[0] == MP_KEY_MOUSE_LEAVE))
msgl = MSGL_DBG2;
char *key_buf = get_key_combo_name(keys, n); char *key_buf = get_key_combo_name(keys, n);
mp_tmsg(MSGT_INPUT, MSGL_WARN, mp_tmsg(MSGT_INPUT, msgl, "No bind found for key '%s'.\n", key_buf);
"No bind found for key '%s'.\n", key_buf);
talloc_free(key_buf); talloc_free(key_buf);
return NULL; return NULL;
} }