summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-01 20:36:57 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-01 20:57:40 +0200
commit134c3e148cbe2f21608e6d67431f23c3fcbbda8f (patch)
tree7ea14eb6d738ed2b5ffcf14f0d3c50fc62a7ab09
parent6a55fa679373e65d4be838c1cb0724c0d1ed2d20 (diff)
downloadmpv-134c3e148cbe2f21608e6d67431f23c3fcbbda8f.tar.bz2
mpv-134c3e148cbe2f21608e6d67431f23c3fcbbda8f.tar.xz
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.
-rw-r--r--etc/input.conf5
-rw-r--r--mpvcore/input/input.c4
-rw-r--r--mpvcore/input/keycodes.h6
-rw-r--r--osdep/macosx_events.m6
4 files changed, 3 insertions, 18 deletions
diff --git a/etc/input.conf b/etc/input.conf
index 9c50ddad1a..04e9df1378 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -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
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c
index f977fd9e9d..41df0af855 100644
--- a/mpvcore/input/input.c
+++ b/mpvcore/input/input.c
@@ -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" },
diff --git a/mpvcore/input/keycodes.h b/mpvcore/input/keycodes.h
index ade5091695..23aa634b5e 100644
--- a/mpvcore/input/keycodes.h
+++ b/mpvcore/input/keycodes.h
@@ -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)
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index e09dc0af93..2edcba57ac 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -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)