From 11d72b0999fa2695b0a4ba30cfd3cc720363421a Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Jan 2015 13:02:42 +0100 Subject: input: handle mixing key press and up/down events better --- input/input.c | 9 +++++---- 1 file 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); } -- cgit v1.2.3