Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
d082caf8
Commit
d082caf8
authored
Apr 11, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added media key support for keyboards by other manufactorers than Apple such as Cherry
parent
8d9f4bb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
modules/gui/macosx/SPMediaKeyTap.m
modules/gui/macosx/SPMediaKeyTap.m
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+2
-2
No files found.
modules/gui/macosx/SPMediaKeyTap.m
View file @
d082caf8
...
...
@@ -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
])
...
...
modules/gui/macosx/intf.m
View file @
d082caf8
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment