From 72f2942dfa575a57d61fe023c845ba711ab78f55 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 3 Jun 2013 00:52:40 +0200 Subject: 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. --- etc/input.conf | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/input.conf b/etc/input.conf index 3a24f8e19c..1cbd2446ba 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -136,7 +136,22 @@ k tv_step_channel -1 n tv_step_norm u tv_step_chanlist -# +# Apple Remote section +AR_PLAY cycle pause +AR_PLAY_HOLD quit +AR_CENTER cycle pause +AR_CENTER_HOLD quit +AR_NEXT seek 10 +AR_NEXT_HOLD seek 120 +AR_PREV seek -10 +AR_PREV_HOLD seek -120 +AR_MENU show_progress +AR_MENU_HOLD cycle mute +AR_VUP add volume 1 +AR_VUP_HOLD add chapter 1 +AR_VDOWN add volume -1 +AR_VDOWN_HOLD add chapter -1 + # Joystick section # WARNING: joystick support has to be explicitly enabled at # compiletime with --enable-joystick -- cgit v1.2.3