From c39efb96d1109b7a5960cd17cc4c392c2b93b61b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 2 Jun 2013 18:23:18 +0200 Subject: osx: implement media keys Media keys are pretty handy if you use mpv as a music player (yes I'm one of those people that do). These are the bindings (which lead to the same behaviour as iTunes): * NX_KEYTYPE_PLAY -> MP_KEY_PLAY * NX_KEYTYPE_FAST -> MP_KEY_NEXT * NX_KEYTYPE_REWIND -> MP_KEY_PREV I just handled these ones as the volume one would be pretty invasive. I could maybe change it to increase the application's volume instead of system volume only when mpv is frontmost (iTunes does this), but some users would probably hate it. --- osdep/macosx_application_objc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'osdep/macosx_application_objc.h') diff --git a/osdep/macosx_application_objc.h b/osdep/macosx_application_objc.h index 7c87ce6fa5..8abe9b98e2 100644 --- a/osdep/macosx_application_objc.h +++ b/osdep/macosx_application_objc.h @@ -27,6 +27,7 @@ struct cocoa_input_queue; @end @interface EventsResponder : NSResponder +- (void)handleMediaKey:(int)key; - (NSEvent *)handleKeyDown:(NSEvent *)event; @end -- cgit v1.2.3