From 8a25a4af655f429382040aac6625ddd776f5da96 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 9 Oct 2014 22:11:12 +0200 Subject: 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. --- osdep/macosx_events.h | 1 + osdep/macosx_events.m | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'osdep') diff --git a/osdep/macosx_events.h b/osdep/macosx_events.h index 34d653c3de..f9008b40ec 100644 --- a/osdep/macosx_events.h +++ b/osdep/macosx_events.h @@ -25,6 +25,7 @@ struct input_ctx; void cocoa_put_key(int keycode); void cocoa_put_key_with_modifiers(int keycode, int modifiers); +void cocoa_put_key_event(void *event); void cocoa_start_event_monitor(void); 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]; -- cgit v1.2.3