Closed plaetzchen closed 10 years ago
Dear plaetzchen,
(void)sendEvent:(NSEvent *)theEvent
Check if [theEvent type] == NSSystemDefined && [theEvent subtype] == SPSystemDefinedEventMediaKeys, then you got a media key, so: int keyCode = (([event data1] & 0xFFFF0000) >> 16); int keyFlags = ([event data1] & 0x0000FFFF); BOOL keyIsPressed = (((keyFlags & 0xFF00) >> 8)) == 0xA; int keyRepeat = (keyFlags & 0x1);
The relevant keyCodes are for play, next (which is sometimes signalled as fast), rewind (sometimes previous) keys. The following defines are needed:
I hope this quick guide will help, but feel free to ask. Wishes, Zsolt
Thanks. I've done that, please see #6
Okay, I merged it, I'll do a new Magic Keys release in 1-2 days if it's fine for you!
Sure, the update for the AppStore with the support will take some time anyway
I thought so :) Nevertheless, I updated it, it's 1.4.1 now.
Hi,
How can I add MagicKeys support to my music app?
Bests, Philip