Siarhei Vishniakou | 46429ecd | 2017-11-02 18:25:12 -0700 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # |
| 16 | # Xbox Wireless Controller |
| 17 | # |
| 18 | |
| 19 | |
| 20 | # Mapping according to https://developer.android.com/training/game-controllers/controller-input.html |
| 21 | |
| 22 | key 0x132 BUTTON_X |
| 23 | key 0x130 BUTTON_A |
| 24 | key 0x131 BUTTON_B |
| 25 | key 0x133 BUTTON_Y |
| 26 | |
| 27 | key 0x134 BUTTON_L1 |
| 28 | key 0x135 BUTTON_R1 |
| 29 | |
| 30 | # LT axis |
| 31 | axis 0x02 LTRIGGER |
| 32 | # RT axis |
| 33 | axis 0x05 RTRIGGER |
| 34 | |
| 35 | |
| 36 | # Left Analog Stick |
| 37 | axis 0x00 X |
| 38 | axis 0x01 Y |
| 39 | # Right Analog Stick |
| 40 | axis 0x03 Z |
| 41 | axis 0x04 RZ |
| 42 | |
| 43 | # Left stick click |
| 44 | key 0x138 BUTTON_THUMBL |
| 45 | # Right stick click |
| 46 | key 0x139 BUTTON_THUMBR |
| 47 | |
| 48 | # Hat |
| 49 | axis 0x10 HAT_X |
| 50 | axis 0x11 HAT_Y |
| 51 | |
| 52 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt |
| 53 | # Two overlapping rectangles |
| 54 | key 0x136 BUTTON_SELECT |
| 55 | # Hamburger - 3 parallel lines |
| 56 | key 0x137 BUTTON_START |
| 57 | |
| 58 | # Xbox key |
Siarhei Vishniakou | 0b60744 | 2018-08-21 18:30:16 -0700 | [diff] [blame] | 59 | key 0x8b BUTTON_MODE |