[vlc-commits] macosx: added media key support for keyboards by other manufactorers than Apple such as Cherry
Felix Paul Kühne
git at videolan.org
Wed Apr 11 21:48:31 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Apr 11 21:48:30 2012 +0200| [d082caf8f4f680bcfbcef9b6e86fafc1b16bca13] | committer: Felix Paul Kühne
macosx: added media key support for keyboards by other manufactorers than Apple such as Cherry
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d082caf8f4f680bcfbcef9b6e86fafc1b16bca13
---
modules/gui/macosx/SPMediaKeyTap.m | 2 +-
modules/gui/macosx/intf.m | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/SPMediaKeyTap.m b/modules/gui/macosx/SPMediaKeyTap.m
index 4d3da8c..52a6650 100644
--- a/modules/gui/macosx/SPMediaKeyTap.m
+++ b/modules/gui/macosx/SPMediaKeyTap.m
@@ -183,7 +183,7 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE
return event;
int keyCode = (([nsEvent data1] & 0xFFFF0000) >> 16);
- if (keyCode != NX_KEYTYPE_PLAY && keyCode != NX_KEYTYPE_FAST && keyCode != NX_KEYTYPE_REWIND)
+ if (keyCode != NX_KEYTYPE_PLAY && keyCode != NX_KEYTYPE_FAST && keyCode != NX_KEYTYPE_REWIND && keyCode != NX_KEYTYPE_PREVIOUS && keyCode != NX_KEYTYPE_NEXT)
return event;
if (![self shouldInterceptMediaKeyEvents])
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 76b602e..3d8547d 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -824,7 +824,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if( keyCode == NX_KEYTYPE_PLAY && keyState == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
- if( keyCode == NX_KEYTYPE_FAST && !b_mediakeyJustJumped )
+ if( (keyCode == NX_KEYTYPE_FAST || keyCode == NX_KEYTYPE_NEXT) && !b_mediakeyJustJumped )
{
if( keyState == 0 && keyRepeat == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_NEXT );
@@ -838,7 +838,7 @@ static VLCMain *_o_sharedMainInstance = nil;
}
}
- if( keyCode == NX_KEYTYPE_REWIND && !b_mediakeyJustJumped )
+ if( (keyCode == NX_KEYTYPE_REWIND || keyCode == NX_KEYTYPE_PREVIOUS) && !b_mediakeyJustJumped )
{
if( keyState == 0 && keyRepeat == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PREV );
More information about the vlc-commits
mailing list