mirror of https://github.com/mpv-player/mpv
osx: use MP_KEY_* instead of MK_* for media keys
In 213ad5d6c
I added `MK_*` key bindings overlooking the fact that mpv already
has `MP_KEY_*` for media keys.
This commit is contained in:
parent
6a55fa6793
commit
134c3e148c
|
@ -171,11 +171,6 @@
|
|||
#AR_VDOWN add volume -1
|
||||
#AR_VDOWN_HOLD add chapter -1
|
||||
|
||||
# Media Keys section
|
||||
#MK_PLAY cycle pause
|
||||
#MK_PREV playlist_prev
|
||||
#MK_NEXT playlist_next
|
||||
|
||||
# Joystick section
|
||||
# WARNING: joystick support has to be explicitly enabled at
|
||||
# compiletime with --enable-joystick
|
||||
|
|
|
@ -429,10 +429,6 @@ static const struct key_name key_names[] = {
|
|||
{ MP_AR_VDOWN, "AR_VDOWN" },
|
||||
{ MP_AR_VDOWN_HOLD, "AR_VDOWN_HOLD" },
|
||||
|
||||
{ MP_MK_PLAY, "MK_PLAY" },
|
||||
{ MP_MK_PREV, "MK_PREV" },
|
||||
{ MP_MK_NEXT, "MK_NEXT" },
|
||||
|
||||
{ MP_AXIS_UP, "AXIS_UP" },
|
||||
{ MP_AXIS_DOWN, "AXIS_DOWN" },
|
||||
{ MP_AXIS_LEFT, "AXIS_LEFT" },
|
||||
|
|
|
@ -201,12 +201,6 @@
|
|||
#define MP_AR_VDOWN (MP_AR_BASE + 12)
|
||||
#define MP_AR_VDOWN_HOLD (MP_AR_BASE + 13)
|
||||
|
||||
// Apple Media Keys input module
|
||||
#define MP_MK_BASE (MP_KEY_BASE+0xF0)
|
||||
#define MP_MK_PLAY (MP_MK_BASE + 0)
|
||||
#define MP_MK_PREV (MP_MK_BASE + 1)
|
||||
#define MP_MK_NEXT (MP_MK_BASE + 2)
|
||||
|
||||
// Mouse wheels or touchpad input
|
||||
#define MP_AXIS_BASE (MP_KEY_BASE+0x100)
|
||||
#define MP_AXIS_UP (MP_AXIS_BASE+0)
|
||||
|
|
|
@ -242,9 +242,9 @@ void cocoa_put_key_with_modifiers(int keycode, int modifiers)
|
|||
- (BOOL)handleMediaKey:(NSEvent *)event
|
||||
{
|
||||
NSDictionary *keymap = @{
|
||||
@(NX_KEYTYPE_PLAY): @(MP_MK_PLAY),
|
||||
@(NX_KEYTYPE_REWIND): @(MP_MK_PREV),
|
||||
@(NX_KEYTYPE_FAST): @(MP_MK_NEXT),
|
||||
@(NX_KEYTYPE_PLAY): @(MP_KEY_PLAY),
|
||||
@(NX_KEYTYPE_REWIND): @(MP_KEY_PREV),
|
||||
@(NX_KEYTYPE_FAST): @(MP_KEY_NEXT),
|
||||
};
|
||||
|
||||
return [self handleKey:mk_code(event)
|
||||
|
|
Loading…
Reference in New Issue