diff options
author | wm4 <wm4@nowhere> | 2013-09-06 00:28:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-06 00:45:03 +0200 |
commit | db79db8444d5daa2870a3228057b3000892ba074 (patch) | |
tree | f14d56eeba7f7ef4776eed1a675bcb1bb3140f2d /mpvcore/input | |
parent | af83cac9b8efe2dc473cf5e8d1f59f8675167ee9 (diff) | |
download | mpv-db79db8444d5daa2870a3228057b3000892ba074.tar.bz2 mpv-db79db8444d5daa2870a3228057b3000892ba074.tar.xz |
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.
Diffstat (limited to 'mpvcore/input')
-rw-r--r-- | mpvcore/input/input.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c index 366c380ce4..f935b17bbf 100644 --- a/mpvcore/input/input.c +++ b/mpvcore/input/input.c @@ -1363,9 +1363,12 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, char *force_section, } 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); - mp_tmsg(MSGT_INPUT, MSGL_WARN, - "No bind found for key '%s'.\n", key_buf); + mp_tmsg(MSGT_INPUT, msgl, "No bind found for key '%s'.\n", key_buf); talloc_free(key_buf); return NULL; } |