summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-02 21:13:56 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-02 21:13:56 +0200
commitd57e1aa599edcef03d03478e52357143ca064ad9 (patch)
tree4e8d1edae92af22f6cd089794b66c88dca8e39f3 /osdep
parentadd7c2955df7a0c3ee2c0889193b21007113fc3e (diff)
downloadmpv-d57e1aa599edcef03d03478e52357143ca064ad9.tar.bz2
mpv-d57e1aa599edcef03d03478e52357143ca064ad9.tar.xz
macosx_events: send a `release all` after key up events
This prevents keys to become stuck due to changing keyboard modifiers during the key down. Not the prettiest approach but event `x11_common` does it like this. Fixes #210
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_events.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index 0756de1607..9e3ced3197 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -313,6 +313,8 @@ void cocoa_put_key_with_modifiers(int keycode, int modifiers)
{
if (key > 0) {
cocoa_put_key(key | mask);
+ if (mask & MP_KEY_STATE_UP)
+ cocoa_put_key(MP_INPUT_RELEASE_ALL);
return YES;
} else {
return NO;