Siarhei Vishniakou | 2abc5d2 | 2020-05-13 14:16:52 -0700 | [diff] [blame] | 1 | # Copyright (C) 2020 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 | # Steam Controller - Model 1001 - USB |
| 17 | # |
| 18 | |
| 19 | # Mapping according to https://developer.android.com/training/game-controllers/controller-input.html |
| 20 | |
| 21 | key 304 BUTTON_A |
| 22 | key 305 BUTTON_B |
| 23 | key 307 BUTTON_X |
| 24 | key 308 BUTTON_Y |
| 25 | |
| 26 | key 310 BUTTON_L1 |
| 27 | key 311 BUTTON_R1 |
| 28 | key 312 BUTTON_L2 |
| 29 | key 313 BUTTON_R2 |
| 30 | |
| 31 | # Triggers. |
| 32 | axis 0x15 LTRIGGER |
| 33 | axis 0x14 RTRIGGER |
| 34 | |
| 35 | # Left and right stick. |
| 36 | axis 0x00 X |
| 37 | axis 0x01 Y |
| 38 | |
| 39 | # Right stick / mousepad |
| 40 | axis 0x03 Z |
| 41 | axis 0x04 RZ |
| 42 | |
| 43 | key 317 BUTTON_THUMBL |
| 44 | key 318 BUTTON_THUMBR |
| 45 | |
| 46 | # Hat. |
| 47 | axis 0x10 HAT_X |
| 48 | axis 0x11 HAT_Y |
| 49 | |
| 50 | # Dpad (clicks) |
| 51 | key 544 DPAD_UP |
| 52 | key 545 DPAD_DOWN |
| 53 | key 546 DPAD_LEFT |
| 54 | key 547 DPAD_RIGHT |
| 55 | |
| 56 | # Touching the dpad (light touch without pressing down) |
| 57 | key 289 BUTTON_1 |
| 58 | # Touching the "right stick" / mousepad (light touch without pressing down) |
| 59 | key 290 BUTTON_2 |
| 60 | |
| 61 | # Pressing the large paddle on the back, left (linux BTN_WHEEL / BTN_GEAR_DOWN) |
| 62 | key 336 BUTTON_3 |
| 63 | # Pressing the large paddle on the back, right (linux BTN_GEAR_UP) |
| 64 | key 337 BUTTON_4 |
| 65 | |
| 66 | |
| 67 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt |
| 68 | # Left arrow |
| 69 | key 314 BUTTON_SELECT |
| 70 | # Right arrow |
| 71 | key 315 BUTTON_START |
| 72 | |
| 73 | # Steam key |
| 74 | key 316 BUTTON_MODE |