mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
add7c2955d
commit
d57e1aa599
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue