1 # Copyright (C) 2011 The Android Open Source Project
\r
3 # Licensed under the Apache License, Version 2.0 (the "License");
\r
4 # you may not use this file except in compliance with the License.
\r
5 # You may obtain a copy of the License at
\r
7 # http://www.apache.org/licenses/LICENSE-2.0
\r
9 # Unless required by applicable law or agreed to in writing, software
\r
10 # distributed under the License is distributed on an "AS IS" BASIS,
\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
12 # See the License for the specific language governing permissions and
\r
13 # limitations under the License.
\r
16 # OUYA Game Controller
\r
24 # Button "LB" maps to BUTTON_L1.
\r
26 # Button "RB" maps to BUTTON_R1.
\r
29 # These two keycodes are for click (press from above) on analog control sticks.
\r
30 key 0x136 BUTTON_THUMBL
\r
31 key 0x137 BUTTON_THUMBR
\r
37 key 0x13b DPAD_RIGHT
\r
39 # Power and Home Key
\r
40 key 0x13e HOME #Short Press
\r
41 key 0x13f HOME ALT #Long Press
\r
43 # Left (0x00, 0x01) and right (0x03, 0x04) analog control stick.
\r
44 # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
\r
45 # This confuses applications that rely on the flat value because the joystick actually
\r
46 # settles in a flat range of +/- 4096 or so.
\r
47 axis 0x00 X flat 4096
\r
48 axis 0x01 Y flat 4096
\r
49 axis 0x03 Z flat 4096
\r
50 axis 0x04 RZ flat 4096
\r
53 # (Shoulder trigger buttons marked with "LT" and "RT" are analog.
\r
54 # Each axis has range from 0 to 255.)
\r