summaryrefslogtreecommitdiffstats
path: root/core/input/keycodes.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-03 00:52:40 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-03 22:35:47 +0200
commit72f2942dfa575a57d61fe023c845ba711ab78f55 (patch)
treed62395e98d5ee0ae58a5779bd8b472ee90aa9a80 /core/input/keycodes.h
parentc39efb96d1109b7a5960cd17cc4c392c2b93b61b (diff)
downloadmpv-72f2942dfa575a57d61fe023c845ba711ab78f55.tar.bz2
mpv-72f2942dfa575a57d61fe023c845ba711ab78f55.tar.xz
osx: add Apple Remote support
After killing the non functional AR support in c8fd9e5 I got much complaints so this adds AR support back in (and it works). I am using the HIDRemote class by Felix Schwarz and that part of the code is under the BSD license. I slightly modified it replacing [NSApplication sharedApplication] with NSApp. The code of the class is quite complex (probably because it had to deal with all the edge cases with IOKit) but it works nicely as a black box. In a later commit I'll remove the deprecation warnings caused by HIDRemote's usage of Gestalt. Check out `etc/input.conf` for the default bindings. Apple Remote functionality is automatically compiled in when cocoa is enabled. It can be disabled at runtime with the `--no-ar` option.
Diffstat (limited to 'core/input/keycodes.h')
-rw-r--r--core/input/keycodes.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/input/keycodes.h b/core/input/keycodes.h
index 2e0e5fd33f..b9d2da23b7 100644
--- a/core/input/keycodes.h
+++ b/core/input/keycodes.h
@@ -172,6 +172,23 @@
#define MP_MOUSE_BTN19_DBL (MP_MOUSE_BASE_DBL+19)
#define MP_MOUSE_BTN_DBL_END (MP_MOUSE_BASE_DBL+20)
+// Apple Remote input module
+#define MP_AR_BASE (MP_KEY_BASE+0xE0)
+#define MP_AR_PLAY (MP_AR_BASE + 0)
+#define MP_AR_PLAY_HOLD (MP_AR_BASE + 1)
+#define MP_AR_CENTER (MP_AR_BASE + 2)
+#define MP_AR_CENTER_HOLD (MP_AR_BASE + 3)
+#define MP_AR_NEXT (MP_AR_BASE + 4)
+#define MP_AR_NEXT_HOLD (MP_AR_BASE + 5)
+#define MP_AR_PREV (MP_AR_BASE + 6)
+#define MP_AR_PREV_HOLD (MP_AR_BASE + 7)
+#define MP_AR_MENU (MP_AR_BASE + 8)
+#define MP_AR_MENU_HOLD (MP_AR_BASE + 9)
+#define MP_AR_VUP (MP_AR_BASE + 10)
+#define MP_AR_VUP_HOLD (MP_AR_BASE + 11)
+#define MP_AR_VDOWN (MP_AR_BASE + 12)
+#define MP_AR_VDOWN_HOLD (MP_AR_BASE + 13)
+
/* Special keys */
#define MP_KEY_INTERN (MP_KEY_BASE+0x1000)
#define MP_KEY_CLOSE_WIN (MP_KEY_INTERN+0)