diff options
author | wm4 <wm4@nowhere> | 2015-01-23 13:02:42 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:21 +0900 |
commit | e0e58e18c0819c635c56115baf6cea14119c5e43 (patch) | |
tree | e1620f5181702c68e9dbc631bdc71d5b77dc0325 | |
parent | 6f9eb960c7a83422dd17079b3d3b3171546006c5 (diff) | |
download | mpv-e0e58e18c0819c635c56115baf6cea14119c5e43.tar.bz2 mpv-e0e58e18c0819c635c56115baf6cea14119c5e43.tar.xz |
input: handle mixing key press and up/down events better
-rw-r--r-- | input/input.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/input/input.c b/input/input.c index 79197e5a62..ecf897a9c2 100644 --- a/input/input.c +++ b/input/input.c @@ -593,10 +593,11 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale) release_down_cmd(ictx, false); } else { // Press of key with no separate down/up events - if (ictx->last_key_down == code) { - // Mixing press events and up/down with the same key is not allowed - MP_WARN(ictx, "Mixing key presses and up/down.\n"); - } + // Mixing press events and up/down with the same key is not supported, + // and input sources shouldn't do this, but can happen anyway if + // multiple input sources interfere with each others. + if (ictx->last_key_down == code) + release_down_cmd(ictx, false); cmd = resolve_key(ictx, code); } |