diff options
Diffstat (limited to 'video/out/cocoa')
-rw-r--r-- | video/out/cocoa/events_view.m | 8 | ||||
-rw-r--r-- | video/out/cocoa/mpvadapter.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m index 744c3f27c7..6de24c470c 100644 --- a/video/out/cocoa/events_view.m +++ b/video/out/cocoa/events_view.m @@ -130,6 +130,14 @@ - (BOOL)becomeFirstResponder { return YES; } - (BOOL)resignFirstResponder { return YES; } +- (void)keyDown:(NSEvent *)event { + [self.adapter putKeyEvent:event]; +} + +- (void)keyUp:(NSEvent *)event { + [self.adapter putKeyEvent:event]; +} + - (BOOL)canHideCursor { return !self.hasMouseDown && [self containsMouseLocation]; diff --git a/video/out/cocoa/mpvadapter.h b/video/out/cocoa/mpvadapter.h index 205b2b1443..1355a5b345 100644 --- a/video/out/cocoa/mpvadapter.h +++ b/video/out/cocoa/mpvadapter.h @@ -23,6 +23,7 @@ - (void)unlock; - (void)setNeedsResize; - (void)signalMouseMovement:(NSPoint)point; +- (void)putKeyEvent:(NSEvent*)event; - (void)putKey:(int)mpkey withModifiers:(int)modifiers; - (void)putAxis:(int)mpkey delta:(float)delta; - (void)putCommand:(char*)cmd; |