summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_events.m
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 22:11:12 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 22:14:41 +0200
commit8a25a4af655f429382040aac6625ddd776f5da96 (patch)
tree5c8a6a3b78989e20981884cb1f77396a933a0552 /osdep/macosx_events.m
parente99a37f635ae1ddf933ce4a21634946b3fca3330 (diff)
downloadmpv-8a25a4af655f429382040aac6625ddd776f5da96.tar.bz2
mpv-8a25a4af655f429382040aac6625ddd776f5da96.tar.xz
cocoa: post keydown and keyup events without event monitor
Our code worked under the assumption that the event monitor is always active and we did remove the keydown and keyup overrides from our cocoa view.
Diffstat (limited to 'osdep/macosx_events.m')
-rw-r--r--osdep/macosx_events.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index 71a9591134..f913b5db1a 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -189,6 +189,11 @@ void cocoa_put_key(int keycode)
mp_input_put_key(inputContext, keycode);
}
+void cocoa_put_key_event(void *event)
+{
+ [[EventsResponder sharedInstance] handleKey:event];
+}
+
void cocoa_put_key_with_modifiers(int keycode, int modifiers)
{
keycode |= [[EventsResponder sharedInstance] mapKeyModifiers:modifiers];