Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed, atv2 IR remote keymapping, thanks dazex for the fixes

  • Loading branch information...
commit 22f8fc54f1381763446d3261a15ca9f5b0370da8 1 parent 8a5b398
authored February 25, 2011
123  system/keymaps/joystick.AppleRemote.xml
... ...
@@ -1,39 +1,32 @@
1  
-<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
2  
-<!-- The <global> section is a fall through - they will only be used if the button is not          -->
3  
-<!-- used in the current window's section.  Note that there is only handling                       -->
4  
-<!-- for a single action per button at this stage.                                                 -->
5  
-<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox       -->
6  
-<!-- gamepads.                                                                                     -->
  1
+<!-- This file contains the mapping of keys (gamepad,remote and keyboard) to actions within XBMC -->
  2
+<!-- The <global> section is a fall through - they will only be used if the button is not        -->
  3
+<!-- used in the current window's section.  Note that there is only handling                     -->
  4
+<!-- for a single action per button at this stage.                                               -->
  5
+<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox     -->
  6
+<!-- gamepads.                                                                                   -->
7 7
 
8  
-<!-- The format is:                      -->
9  
-<!--    <device>                         -->
10  
-<!--      <button>action</button>        -->
11  
-<!--    </device>                        -->
  8
+<!-- The format is:                                                                              -->
  9
+<!--    <device>                                                                                 -->
  10
+<!--      <button id="#">xbmc action</button>                                                    -->
  11
+<!--    </device>                                                                                -->
12 12
 
13 13
 <!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
14 14
 <!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
15  
-<!-- You set it up by adding a <universalremote> block to the window or <global> section:       -->
16  
-<!--    <universalremote>             -->
17  
-<!--       <obc45>Stop</obc45>         -->
18  
-<!--    </universalremote>            -->
  15
+<!-- You set it up by adding a <universalremote> block to the window or <global> section:        -->
  16
+<!--    <universalremote>                                                                        -->
  17
+<!--       <obc45>Stop</obc45>                                                                   -->
  18
+<!--    </universalremote>                                                                       -->
19 19
 
20  
-<!-- Note that the action can be a built-in function.                 -->
21  
-<!--  eg <B>XBMC.ActivateWindow(MyMusic)</B>                         -->
22  
-<!-- would automatically go to My Music on the press of the B button. -->
  20
+<!-- Note that the action can be a built-in function.                                            -->
  21
+<!--            eg <button id="6">XBMC.ActivateWindow(Favourites)</button>                       -->
  22
+<!-- would bring up Favourites when the button with the id of 6 is press. In this case, "Menu"   -->
  23
+
  24
+<!--                                                                                             -->
  25
+<!--  Button Ids:                                                                                -->
  26
+<!--  'id' is the button ID used by SDL. The button ids recognized from your remote appears      -->
  27
+<!--  in /var/log/syslog on the ATV2 for each button pressed and when debug mode is enabled      -->
  28
+<!--  Use your log to discover and map custom buttons to actions.                                -->
23 29
 
24  
-<!-- Joysticks / Gamepads:                                                                    -->
25  
-<!--   See the sample PS3 controller configuration below for the format.                      -->
26  
-<!--                                                                                          -->
27  
-<!--  Joystick Name:                                                                          -->
28  
-<!--   Do 'cat /proc/bus/input/devices' or see your xbmc log file  to find the names of       -->
29  
-<!--   detected joysticks. The name used in the configuration should match the detected name. -->
30  
-<!--                                                                                          -->
31  
-<!--  Button Ids:                                                                             -->
32  
-<!--   'id' is the button ID used by SDL. Joystick button ids of connected joysticks appear   -->
33  
-<!--   in xbmc.log when they are pressed. Use your log to map custom buttons to actions.      -->
34  
-<!--                                                                                          -->
35  
-<!--  Axis Ids / Analog Controls                                                              -->
36  
-<!--   Coming soon.                                                                           -->
37 30
 <keymap>
38 31
   <global>
39 32
     <joystick name="AppleRemote">
@@ -43,28 +36,49 @@
43 36
       <!-- right      -->      <button id="4">Right</button>
44 37
       <!-- center     -->      <button id="5">Select</button>
45 38
       <!-- menu       -->      <button id="6">PreviousMenu</button>
46  
-      <!-- hold center  -->    <button id="7">Fullscreen</button>
  39
+      <!-- hold center-->      <button id="7">Fullscreen</button>
47 40
       <!-- hold menu  -->      <button id="8">ContextMenu</button>
  41
+
48 42
       <!-- old buttons for ATV <2.2, used on OSX  -->
49 43
       <!-- hold left  -->      <button id="9">Left</button>
50 44
       <!-- hold right -->      <button id="10">Right</button>
  45
+
51 46
       <!-- new aluminium remote buttons  -->
52  
-      <!-- play  -->           <button id="12">Play</button>
  47
+      <!-- play/pause -->      <button id="12">Play</button>
  48
+
  49
+      <!-- Additional buttons via Harmony Apple TV remote profile -->
  50
+      <!-- pageup     -->      <button id="13">PageUp</button>
  51
+      <!-- pagedown   -->      <button id="14">PageDown</button>
  52
+      <!-- pause      -->      <button id="15">Pause</button><!-- work? -->
  53
+      <!-- play2      -->      <button id="16">Play</button>
  54
+      <!-- stop       -->      <button id="17">Stop</button>
  55
+      <!-- fast fwd   -->      <button id="18">FastForward</button><!-- work? -->
  56
+      <!-- rewind     -->      <button id="19">Rewind</button>
  57
+      <!-- skip fwd   -->      <button id="20">SkipNext</button>
  58
+      <!-- skip back  -->      <button id="21">SkipPrevious</button>
  59
+
53 60
       <!-- Learned remote buttons (ATV >2.3) -->
54  
-      <!-- Play -->      <button id="70">Play</button>
55  
-      <!-- Pause -->      <button id="71">Pause</button>
56  
-      <!-- Stop -->      <button id="72">Stop</button>
57  
-      <!-- Previous -->      <button id="73">SkipPrevious</button>
58  
-      <!-- Next -->      <button id="74">SkipNext</button>
59  
-      <!-- Rewind -->      <button id="75">Rewind</button>
60  
-      <!-- Forward -->      <button id="76">FastForward</button>
61  
-      <!-- Return -->      <button id="77">OSD</button>
62  
-      <!-- Enter -->      <button id="78">ShowVideoMenu</button>
  61
+      <!-- Play       -->      <button id="70">Play</button>
  62
+      <!-- Pause      -->      <button id="71">Pause</button>
  63
+      <!-- Stop       -->      <button id="72">Stop</button>
  64
+      <!-- Previous   -->      <button id="73">SkipPrevious</button>
  65
+      <!-- Next       -->      <button id="74">SkipNext</button>
  66
+      <!-- Rewind     -->      <button id="75">Rewind</button>
  67
+      <!-- Forward    -->      <button id="76">FastForward</button>
  68
+      <!-- Return     -->      <button id="77">OSD</button>
  69
+      <!-- Enter      -->      <button id="78">ShowVideoMenu</button>
  70
+
63 71
       <!-- few gestures from Apple's iPhone Remote (ATV > 2.3 ?) -->
64 72
       <!-- SwipeLeft  -->      <button id="80">Left</button>
65  
-      <!-- SwipeRight  -->      <button id="81">Right</button>
66  
-      <!-- SwipeUp  -->      <button id="82">Up</button>
  73
+      <!-- SwipeRight -->      <button id="81">Right</button>
  74
+      <!-- SwipeUp    -->      <button id="82">Up</button>
67 75
       <!-- SwipeDown  -->      <button id="83">Down</button>
  76
+
  77
+      <!-- FlickLeft  -->      <button id="85">Left</button>
  78
+      <!-- FlickRight -->      <button id="86">Right</button>
  79
+      <!-- FlickUp    -->      <button id="87">Up</button>
  80
+      <!-- FlickDown  -->      <button id="88">Down</button>
  81
+
68 82
     </joystick>
69 83
   </global>
70 84
   <Home>
@@ -115,6 +129,16 @@
115 129
       <button id="8">Fullscreen</button>
116 130
       <button id="9">Rewind</button>
117 131
       <button id="10">FastForward</button>
  132
+      <!-- pageup     -->      <button id="13">BigStepForward</button>
  133
+      <!-- pagedown   -->      <button id="14">BigStepBack</button>
  134
+      <!-- SwipeLeft  -->      <button id="80">StepBack</button>
  135
+      <!-- SwipeRight -->      <button id="81">StepForward</button>
  136
+      <!-- SwipeUp    -->      <button id="82">BigStepForward</button>
  137
+      <!-- SwipeDown  -->      <button id="83">BigStepBack</button>
  138
+      <!-- FlickLeft  -->      <button id="85">Rewind</button>
  139
+      <!-- FlickRight -->      <button id="86">FastForward</button>
  140
+      <!-- FlickUp    -->      <button id="87">BigStepForward</button>
  141
+      <!-- FlickDown  -->      <button id="88">BigStepBack</button>
118 142
     </joystick>
119 143
   </FullscreenVideo>
120 144
   <FullscreenInfo>
@@ -137,6 +161,10 @@
137 161
       <button id="6">Fullscreen</button>
138 162
       <button id="7">XBMC.ActivateWindow(MusicOSD)</button>
139 163
       <button id="8">Stop</button>
  164
+      <!-- SwipeLeft  -->      <button id="80">SkipPrevious</button>
  165
+      <!-- SwipeRight -->      <button id="81">SkipNext</button>
  166
+      <!-- FlickLeft  -->      <button id="85">SkipPrevious</button>
  167
+      <!-- FlickRight -->      <button id="86">SkipNext</button>
140 168
     </joystick>
141 169
   </Visualisation>
142 170
   <MusicOSD>
@@ -163,6 +191,10 @@
163 191
       <button id="6">Stop</button>
164 192
       <button id="7">Info</button>
165 193
       <button id="8">Rotate</button>
  194
+      <!-- SwipeLeft  -->      <button id="80">PreviousPicture</button>
  195
+      <!-- SwipeRight -->      <button id="81">NextPicture</button>
  196
+      <!-- FlickLeft  -->      <button id="85">PreviousPicture</button>
  197
+      <!-- FlickRight -->      <button id="86">NextPicture</button>
166 198
     </joystick>
167 199
   </SlideShow>
168 200
   <ScreenCalibration>
@@ -178,6 +210,7 @@
178 210
   <VideoOSD>
179 211
     <joystick name="AppleRemote">
180 212
       <button id="6">Close</button>
  213
+      <button id="7">Close</button>
181 214
     </joystick>
182 215
   </VideoOSD>
183 216
   <VideoMenu>
@@ -250,6 +283,10 @@
250 283
       <button id="3">Left</button>
251 284
       <button id="4">Right</button>
252 285
       <button id="6">Close</button>
  286
+      <!-- SwipeLeft  -->      <button id="80">Left</button>
  287
+      <!-- SwipeRight -->      <button id="81">Right</button>
  288
+      <!-- FlickLeft  -->      <button id="85">Left</button>
  289
+      <!-- FlickRight -->      <button id="86">Right</button>
253 290
     </joystick>
254 291
   </PictureInfo>
255 292
   <AddonBrowser>
288  xbmc/osx/atv2/XBMCController.mm
@@ -34,86 +34,116 @@
34 34
 #import "XBMCDebugHelpers.h"
35 35
 
36 36
 typedef enum {
37  
-  ATV_BUTTON_PLAY           = 5,
38  
-  ATV_BUTTON_MENU           = 6,
39  
-  ATV_BUTTON_MENU_H         = 8,
40  
-  ATV_BUTTON_UP             = 1,
41  
-  ATV_BUTTON_UP_RELEASE     = 1,
42  
-  ATV_BUTTON_DOWN           = 2,
43  
-  ATV_BUTTON_DOWN_RELEASE   = 2,
44  
-  ATV_BUTTON_RIGHT          = 4,
45  
-  ATV_BUTTON_RIGHT_RELEASE  = 4,
46  
-  ATV_BUTTON_LEFT           = 3,
47  
-  ATV_BUTTON_LEFT_RELEASE   = 3,   
48  
-  ATV_BUTTON_PLAY_H         = 7,
49  
-  
50  
-  ATV_BUTTON_LEFT_H         = 9,
51  
-  ATV_BUTTON_LEFT_H_RELEASE = 9,
52  
-  ATV_BUTTON_RIGHT_H        = 10,
53  
-  ATV_BUTTON_RIGHT_H_RELEASE= 10,
  37
+
  38
+  ATV_BUTTON_UP                 = 1,
  39
+  ATV_BUTTON_UP_RELEASE         = 1,
  40
+  ATV_BUTTON_DOWN               = 2,
  41
+  ATV_BUTTON_DOWN_RELEASE       = 2,
  42
+  ATV_BUTTON_LEFT               = 3,
  43
+  ATV_BUTTON_LEFT_RELEASE       = 3,
  44
+  ATV_BUTTON_RIGHT              = 4,
  45
+  ATV_BUTTON_RIGHT_RELEASE      = 4,
  46
+  ATV_BUTTON_PLAY               = 5,
  47
+  ATV_BUTTON_MENU               = 6,
  48
+  ATV_BUTTON_PLAY_H             = 7,
  49
+  ATV_BUTTON_MENU_H             = 8,
  50
+  ATV_BUTTON_LEFT_H             = 9,
  51
+  ATV_BUTTON_LEFT_H_RELEASE     = 9,
  52
+  ATV_BUTTON_RIGHT_H            = 10,
  53
+  ATV_BUTTON_RIGHT_H_RELEASE    = 10,
54 54
 
55 55
   //new aluminium remote buttons
56  
-  ATV_ALUMINIUM_PLAY        = 12,
57  
-  ATV_ALUMINIUM_PLAY_H      = 13,
58  
-  
  56
+  ATV_ALUMINIUM_PLAY            = 12,
  57
+  ATV_ALUMINIUM_PLAY_H          = 11,
  58
+
  59
+  //newly added remote buttons  
  60
+  ATV_BUTTON_PAGEUP             = 13,
  61
+  ATV_BUTTON_PAGEDOWN           = 14,
  62
+  ATV_BUTTON_PAUSE              = 15,
  63
+  ATV_BUTTON_PLAY2              = 16,
  64
+  ATV_BUTTON_STOP               = 17,
  65
+  ATV_BUTTON_STOP_RELEASE       = 17,
  66
+  ATV_BUTTON_FASTFWD            = 18,
  67
+  ATV_BUTTON_FASTFWD_RELEASE    = 18,
  68
+  ATV_BUTTON_REWIND             = 19,
  69
+  ATV_BUTTON_REWIND_RELEASE     = 19,
  70
+  ATV_BUTTON_SKIPFWD            = 20,
  71
+  ATV_BUTTON_SKIPBACK           = 21,
  72
+
59 73
   //learned remote buttons
60  
-  ATV_LEARNED_PLAY          = 70,
61  
-  ATV_LEARNED_PAUSE         = 71,
62  
-  ATV_LEARNED_STOP          = 72,
63  
-  ATV_LEARNED_PREVIOUS      = 73,
64  
-  ATV_LEARNED_NEXT          = 74,
65  
-  ATV_LEARNED_REWIND        = 75,
66  
-  ATV_LEARNED_REWIND_RELEASE= 75,
67  
-  ATV_LEARNED_FORWARD       = 76,
68  
-  ATV_LEARNED_FORWARD_RELEASE=76,
69  
-  ATV_LEARNED_RETURN        = 77,
70  
-  ATV_LEARNED_ENTER         = 78,
  74
+  ATV_LEARNED_PLAY              = 70,
  75
+  ATV_LEARNED_PAUSE             = 71,
  76
+  ATV_LEARNED_STOP              = 72,
  77
+  ATV_LEARNED_PREVIOUS          = 73,
  78
+  ATV_LEARNED_NEXT              = 74,
  79
+  ATV_LEARNED_REWIND            = 75,
  80
+  ATV_LEARNED_REWIND_RELEASE    = 75,
  81
+  ATV_LEARNED_FORWARD           = 76,
  82
+  ATV_LEARNED_FORWARD_RELEASE   = 76,
  83
+  ATV_LEARNED_RETURN            = 77,
  84
+  ATV_LEARNED_ENTER             = 78,
71 85
 
72 86
   //gestures
73  
-  ATV_GESTURE_SWIPE_LEFT    = 80,
74  
-  ATV_GESTURE_SWIPE_RIGHT   = 81,
75  
-  ATV_GESTURE_SWIPE_UP      = 82,
76  
-  ATV_GESTURE_SWIPE_DOWN    = 83,
77  
-  
78  
-  ATV_BTKEYPRESS            = 84,
79  
-  
  87
+  ATV_GESTURE_SWIPE_LEFT        = 80,
  88
+  ATV_GESTURE_SWIPE_RIGHT       = 81,
  89
+  ATV_GESTURE_SWIPE_UP          = 82,
  90
+  ATV_GESTURE_SWIPE_DOWN        = 83,
  91
+
  92
+  ATV_GESTURE_FLICK_LEFT        = 85,
  93
+  ATV_GESTURE_FLICK_RIGHT       = 86,
  94
+  ATV_GESTURE_FLICK_UP          = 87,
  95
+  ATV_GESTURE_FLICK_DOWN        = 88,
  96
+  ATV_GESTURE_TOUCHHOLD         = 89,
  97
+
  98
+  ATV_BTKEYPRESS                = 84,
  99
+
80 100
   ATV_INVALID_BUTTON
81 101
 } eATVClientEvent;
82 102
 
83 103
 typedef enum {
84 104
   // for originator kBREventOriginatorRemote
85  
-  kBREventRemoteActionMenu = 1,
86  
-  kBREventRemoteActionMenuHold,
87  
-  kBREventRemoteActionUp,
88  
-  kBREventRemoteActionDown,
89  
-  kBREventRemoteActionPlay,
90  
-  kBREventRemoteActionLeft,
91  
-  kBREventRemoteActionRight,
92  
-
93  
-  kBREventRemoteActionALPlay = 10,
94  
-
95  
-  kBREventRemoteAction13     = 13,  // PageUp
96  
-  kBREventRemoteAction14     = 14,  // PageDn
97  
-  kBREventRemoteAction15     = 15,  // Pause
98  
-  kBREventRemoteAction16     = 16,  // Play
99  
-  kBREventRemoteAction17     = 17,  // Stop
100  
-  kBREventRemoteAction18     = 18,  // FastForward
101  
-  kBREventRemoteAction19     = 19,  // Rewind
102  
-
103  
-  kBREventRemoteActionPlayHold = 20,
  105
+  kBREventRemoteActionMenu      = 1,
  106
+  kBREventRemoteActionMenuHold  = 2,
  107
+  kBREventRemoteActionUp        = 3,
  108
+  kBREventRemoteActionDown      = 4,
  109
+  kBREventRemoteActionPlay      = 5,
  110
+  kBREventRemoteActionLeft      = 6,
  111
+  kBREventRemoteActionRight     = 7,
  112
+
  113
+  kBREventRemoteActionALPlay    = 10,
  114
+
  115
+  kBREventRemoteActionPageUp    = 13,
  116
+  kBREventRemoteActionPageDown  = 14,
  117
+  kBREventRemoteActionPause     = 15,
  118
+  kBREventRemoteActionPlay2     = 16,
  119
+  kBREventRemoteActionStop      = 17,
  120
+  kBREventRemoteActionFastFwd   = 18,
  121
+  kBREventRemoteActionRewind    = 19,
  122
+  kBREventRemoteActionSkipBack  = 20,
  123
+  kBREventRemoteActionSkipFwd   = 21,
  124
+
  125
+  kBREventRemoteActionPlayHold  = 22,
104 126
   kBREventRemoteActionCenterHold,
105 127
   kBREventRemoteActionCenterHold42,
106 128
 
107 129
   // Gestures, for originator kBREventOriginatorGesture
108  
-  kBREventRemoteActionTouchBegin = 30,
109  
-  kBREventRemoteActionTouchMove,
110  
-  kBREventRemoteActionTouchEnd,
111  
-  kBREventRemoteActionSwipeLeft,
112  
-  kBREventRemoteActionSwipeRight,
113  
-  kBREventRemoteActionSwipeUp,
114  
-  kBREventRemoteActionSwipeDown,
115  
-  
116  
-  kBREventRemoteActionKeyPress = 47,
  130
+  kBREventRemoteActionTouchBegin= 31,
  131
+  kBREventRemoteActionTouchMove = 32,
  132
+  kBREventRemoteActionTouchEnd  = 33,
  133
+
  134
+  kBREventRemoteActionSwipeLeft = 34,
  135
+  kBREventRemoteActionSwipeRight= 35,
  136
+  kBREventRemoteActionSwipeUp   = 36,
  137
+  kBREventRemoteActionSwipeDown = 37,
  138
+
  139
+  kBREventRemoteActionFlickLeft = 38,
  140
+  kBREventRemoteActionFlickRight= 39,
  141
+  kBREventRemoteActionFlickUp   = 40,
  142
+  kBREventRemoteActionFlickDown = 41,
  143
+
  144
+  kBREventRemoteActionTouchHold = 46,
  145
+
  146
+  kBREventRemoteActionKeyPress  = 47,
117 147
   kBREventRemoteActionKeyPress42,
118 148
   
119 149
 
@@ -396,7 +426,7 @@ - (eATVClientEvent) ATVClientEventFromBREvent:(BREvent*) f_event
396 426
     case 786615:
397 427
       return ATV_LEARNED_STOP;
398 428
 
399  
-    // learned nexxt
  429
+    // learned next
400 430
     case 786613:
401 431
       return ATV_LEARNED_NEXT;
402 432
 
@@ -421,6 +451,130 @@ - (eATVClientEvent) ATVClientEventFromBREvent:(BREvent*) f_event
421 451
     case kBREventRemoteActionKeyPress42:
422 452
       return ATV_BTKEYPRESS;
423 453
 
  454
+    // PageUp
  455
+    case kBREventRemoteActionPageUp:
  456
+      if ([f_event value] == 1)
  457
+        return ATV_BUTTON_PAGEUP;
  458
+      else
  459
+        return ATV_INVALID_BUTTON;
  460
+
  461
+    // PageDown
  462
+    case kBREventRemoteActionPageDown:
  463
+      if ([f_event value] == 1)
  464
+        return ATV_BUTTON_PAGEDOWN;
  465
+      else
  466
+        return ATV_INVALID_BUTTON;
  467
+
  468
+    // Pause
  469
+    case kBREventRemoteActionPause:
  470
+      if ([f_event value] == 1)
  471
+        return ATV_BUTTON_PAUSE;
  472
+      else
  473
+        return ATV_INVALID_BUTTON;
  474
+
  475
+    // Play2
  476
+    case kBREventRemoteActionPlay2:
  477
+      if ([f_event value] == 1)
  478
+        return ATV_BUTTON_PLAY2;
  479
+      else
  480
+        return ATV_INVALID_BUTTON;
  481
+
  482
+    // Stop
  483
+    case kBREventRemoteActionStop:
  484
+      if ([f_event value] == 1)
  485
+        return ATV_BUTTON_STOP;
  486
+      else
  487
+        return ATV_INVALID_BUTTON;
  488
+        //return ATV_BUTTON_STOP_RELEASE;
  489
+
  490
+    // Fast Forward
  491
+    case kBREventRemoteActionFastFwd:
  492
+      if ([f_event value] == 1)
  493
+        return ATV_BUTTON_FASTFWD;
  494
+      else
  495
+        return ATV_INVALID_BUTTON;
  496
+        //return ATV_BUTTON_FASTFWD_RELEASE;
  497
+
  498
+    // Rewind
  499
+    case kBREventRemoteActionRewind:
  500
+      if ([f_event value] == 1)
  501
+        return ATV_BUTTON_REWIND;
  502
+      else
  503
+        return ATV_INVALID_BUTTON;
  504
+        //return ATV_BUTTON_REWIND_RELEASE;
  505
+
  506
+    // Skip Forward
  507
+    case kBREventRemoteActionSkipFwd:
  508
+      if ([f_event value] == 1)
  509
+        return ATV_BUTTON_SKIPFWD;
  510
+      else
  511
+        return ATV_INVALID_BUTTON;
  512
+
  513
+    // Skip Back
  514
+    case kBREventRemoteActionSkipBack:
  515
+      if ([f_event value] == 1)
  516
+        return ATV_BUTTON_SKIPBACK;
  517
+      else
  518
+        return ATV_INVALID_BUTTON;
  519
+
  520
+    // Gesture Swipe Left
  521
+    case kBREventRemoteActionSwipeLeft:
  522
+      if ([f_event value] == 1)
  523
+        return ATV_GESTURE_SWIPE_LEFT;
  524
+      else
  525
+        return ATV_INVALID_BUTTON;
  526
+
  527
+    // Gesture Swipe Right
  528
+    case kBREventRemoteActionSwipeRight:
  529
+      if ([f_event value] == 1)
  530
+        return ATV_GESTURE_SWIPE_RIGHT;
  531
+      else
  532
+        return ATV_INVALID_BUTTON;
  533
+
  534
+    // Gesture Swipe Up
  535
+    case kBREventRemoteActionSwipeUp:
  536
+      if ([f_event value] == 1)
  537
+        return ATV_GESTURE_SWIPE_UP;
  538
+      else
  539
+        return ATV_INVALID_BUTTON;
  540
+
  541
+    // Gesture Swipe Down
  542
+    case kBREventRemoteActionSwipeDown:
  543
+      if ([f_event value] == 1)
  544
+        return ATV_GESTURE_SWIPE_DOWN;
  545
+      else
  546
+        return ATV_INVALID_BUTTON;
  547
+
  548
+    // Gesture Flick Left
  549
+    case kBREventRemoteActionFlickLeft:
  550
+      if ([f_event value] == 1)
  551
+        return ATV_GESTURE_FLICK_LEFT;
  552
+      else
  553
+        return ATV_INVALID_BUTTON;
  554
+
  555
+    // Gesture Flick Right
  556
+    case kBREventRemoteActionFlickRight:
  557
+      if ([f_event value] == 1)
  558
+        return ATV_GESTURE_FLICK_RIGHT;
  559
+      else
  560
+        return ATV_INVALID_BUTTON;
  561
+
  562
+    // Gesture Flick Up
  563
+    case kBREventRemoteActionFlickUp:
  564
+      if ([f_event value] == 1)
  565
+        return ATV_GESTURE_FLICK_UP;
  566
+      else
  567
+        return ATV_INVALID_BUTTON;
  568
+
  569
+    // Gesture Flick Down
  570
+    case kBREventRemoteActionFlickDown:
  571
+      if ([f_event value] == 1)
  572
+        return ATV_GESTURE_FLICK_DOWN;
  573
+      else
  574
+        return ATV_INVALID_BUTTON;
  575
+
  576
+
  577
+
424 578
     default:
425 579
       ELOG(@"XBMCPureController: Unknown button press remoteAction = %i", remoteAction);
426 580
       return ATV_INVALID_BUTTON;

0 notes on commit 22f8fc5

Please sign in to comment.
Something went wrong with that request. Please try again.