summaryrefslogtreecommitdiffstats
path: root/stream/cache.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-07 18:18:41 +0200
committerwm4 <wm4@nowhere>2014-07-07 18:18:41 +0200
commit4d829d750cc872ae4e6bf31117022f8934230972 (patch)
treeec7a3855f2de23a876aba60beb5ef9582627a9e5 /stream/cache.c
parentc07bae02e2d0cdb32e6d4f0741ad039091f64bd7 (diff)
downloadmpv-4d829d750cc872ae4e6bf31117022f8934230972.tar.bz2
mpv-4d829d750cc872ae4e6bf31117022f8934230972.tar.xz
input: restore ability to combine mouse buttons
Key bindings are decided on the "down" event, so if the prefix is not unique, the first/shortest will be used (e.g. when both "a" and "a-b" are mapped, "a" will always be chosen). This also breaks combining multiple mouse buttons. But it seems users expect it to work, and it's indeed a bit strange that it shouldn't work, as mouse bindings are emitted on the key "up" event, not "down" (if the shorter binding didn't emit a command yet, why shouldn't it be combinable). Deal with this by clearing the key history when a command is actually emitted, instead of when a command is decided. This means if both MOUSE_BTN0 and MOUSE_BTN0-MOUSE_BTN1 are mapped, the sequence of holding down BTN0 and then BTN1 will redecide the current command. On the other hand, if BTN0 is released before BTN1 is pressed, the command is emitted, and the key history is deleted. So the BTN1 press will not trigger BTN0-BTN1. For normal keys, nothing should change, because commands are emitted on the "down" event already, so the key history is always cleared. Might fix #902. CC: @mpv-player/stable (if this fix is successful)
Diffstat (limited to 'stream/cache.c')
0 files changed, 0 insertions, 0 deletions