Siarhei Vishniakou | 57a20b7 | 2019-06-14 17:19:29 -0700 | [diff] [blame] | 1 | # Copyright (C) 2019 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 | # Microsoft X-Box One Elite Pad - Model 1698 - USB |
| 17 | # |
| 18 | |
| 19 | # Mapping according to https://developer.android.com/training/game-controllers/controller-input.html |
| 20 | |
| 21 | key 0x130 BUTTON_A |
| 22 | key 0x131 BUTTON_B |
| 23 | key 0x133 BUTTON_X |
| 24 | key 0x134 BUTTON_Y |
| 25 | |
| 26 | key 0x136 BUTTON_L1 |
| 27 | key 0x137 BUTTON_R1 |
| 28 | |
| 29 | # Triggers. |
| 30 | axis 0x02 LTRIGGER |
| 31 | axis 0x05 RTRIGGER |
| 32 | |
| 33 | # Left stick |
| 34 | axis 0x00 X |
| 35 | axis 0x01 Y |
| 36 | # Right stick |
| 37 | axis 0x03 Z |
| 38 | axis 0x04 RZ |
| 39 | |
| 40 | key 0x13d BUTTON_THUMBL |
| 41 | key 0x13e BUTTON_THUMBR |
| 42 | |
| 43 | # Hat. |
| 44 | axis 0x10 HAT_X |
| 45 | axis 0x11 HAT_Y |
| 46 | |
| 47 | |
| 48 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt |
| 49 | |
| 50 | # Two overlapping rectangles |
| 51 | key 0x13a BUTTON_SELECT |
| 52 | # Hamburger - 3 parallel lines |
| 53 | key 0x13b BUTTON_START |
| 54 | |
| 55 | # Xbox key |
| 56 | key 0x13c BUTTON_MODE |