Logitech keyboards work with media keys on 10.5! Added prev/next support.

CQTexperiment
vspader 2008-03-02 19:20:08 +00:00
parent 92be178bf2
commit 76e8bbb2c2
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@
- (void)mediaKeyEvent: (int)key state: (BOOL)state repeat: (BOOL)repeat
{
NSLog(@"MEDIA EVENT KEY!");
switch( key )
{
case NX_KEYTYPE_PLAY:
@ -20,11 +21,13 @@
[[self delegate] clickPlay]; //Play pressed and released
break;
case NX_KEYTYPE_NEXT:
case NX_KEYTYPE_FAST:
if( state == 0 )
[[self delegate] clickNext]; //Next pressed and released
break;
case NX_KEYTYPE_PREVIOUS:
case NX_KEYTYPE_REWIND:
if( state == 0 )
[[self delegate] clickPrev]; //Previous pressed and released