diff options
author | wm4 <wm4@nowhere> | 2015-01-23 13:02:42 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-23 13:02:42 +0100 |
commit | 11d72b0999fa2695b0a4ba30cfd3cc720363421a (patch) | |
tree | 984bdb6083bff74bd6ee011e942af2be8503b627 /input | |
parent | 60dbf192d1c83b60ae3787bf52c671c050db38f8 (diff) | |
download | mpv-11d72b0999fa2695b0a4ba30cfd3cc720363421a.tar.bz2 mpv-11d72b0999fa2695b0a4ba30cfd3cc720363421a.tar.xz |
input: handle mixing key press and up/down events better
Diffstat (limited to 'input')
-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); } |