Kim Low | 0a5109d | 2017-04-04 13:32:19 -0700 | [diff] [blame] | 1 | # Copyright (C) 2018 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 | # Sony Playstation(R)3 Controller |
| 17 | # - Version 0x8000 and 0x8100 are for Linux hid-sony driver >=4.12 |
| 18 | # and when connected over Bluetooth |
| 19 | # |
| 20 | |
| 21 | key 0x220 DPAD_UP |
| 22 | key 0x223 DPAD_RIGHT |
| 23 | key 0x221 DPAD_DOWN |
| 24 | key 0x222 DPAD_LEFT |
| 25 | |
| 26 | key 0x130 BUTTON_A |
| 27 | key 0x131 BUTTON_B |
| 28 | key 0x134 BUTTON_X |
| 29 | key 0x133 BUTTON_Y |
| 30 | key 0x136 BUTTON_L1 |
| 31 | key 0x137 BUTTON_R1 |
| 32 | key 0x138 BUTTON_L2 |
| 33 | key 0x139 BUTTON_R2 |
| 34 | key 0x13d BUTTON_THUMBL |
| 35 | key 0x13e BUTTON_THUMBR |
| 36 | |
| 37 | # left Analog Stick |
| 38 | axis 0x00 X |
| 39 | axis 0x01 Y |
| 40 | |
| 41 | # Right Analog Stick |
| 42 | axis 0x03 Z |
| 43 | axis 0x04 RZ |
| 44 | |
| 45 | # L2 trigger |
| 46 | axis 0x02 LTRIGGER |
| 47 | |
| 48 | # R2 trigger |
| 49 | axis 0x05 RTRIGGER |
| 50 | |
| 51 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt |
| 52 | # Select |
| 53 | key 0x13a BUTTON_SELECT |
| 54 | # Start |
| 55 | key 0x13b BUTTON_START |
| 56 | # PS key |
| 57 | key 0x13c BUTTON_MODE |