Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
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
...
@@ -183,7 +183,7 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE
return
event
;
return
event
;
int
keyCode
=
(([
nsEvent
data1
]
&
0xFFFF0000
)
>>
16
);
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
;
return
event
;
if
(
!
[
self
shouldInterceptMediaKeyEvents
])
if
(
!
[
self
shouldInterceptMediaKeyEvents
])
...
...
modules/gui/macosx/intf.m
View file @
d082caf8
...
@@ -824,7 +824,7 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -824,7 +824,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if
(
keyCode
==
NX_KEYTYPE_PLAY
&&
keyState
==
0
)
if
(
keyCode
==
NX_KEYTYPE_PLAY
&&
keyState
==
0
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_PLAY_PAUSE
);
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
)
if
(
keyState
==
0
&&
keyRepeat
==
0
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_NEXT
);
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_NEXT
);
...
@@ -838,7 +838,7 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -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
)
if
(
keyState
==
0
&&
keyRepeat
==
0
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_PREV
);
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