├── .gitattributes ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── module.prop └── system └── usr └── keylayout ├── Vendor_0079_Product_0011.kl ├── Vendor_045e_Product_028e.kl ├── Vendor_045e_Product_028f.kl ├── Vendor_045e_Product_0291.kl ├── Vendor_045e_Product_02a1.kl ├── Vendor_045e_Product_02d1.kl ├── Vendor_045e_Product_02e0.kl ├── Vendor_045e_Product_02e3.kl ├── Vendor_045e_Product_02e6.kl ├── Vendor_045e_Product_02ea.kl ├── Vendor_045e_Product_02fd.kl ├── Vendor_045e_Product_0719.kl ├── Vendor_045e_Product_0b12.kl ├── Vendor_045e_Product_0b13.kl ├── Vendor_046d_Product_c211.kl ├── Vendor_054c_Product_0268.kl ├── Vendor_054c_Product_05c4.kl ├── Vendor_054c_Product_09cc.kl ├── Vendor_054c_Product_0ce6.kl ├── Vendor_057e_Product_2006.kl ├── Vendor_057e_Product_2007.kl ├── Vendor_057e_Product_2009.kl ├── Vendor_0810_Product_0001.kl ├── Vendor_0e6f_Product_02e3.kl ├── Vendor_1038_Porduct_1412.kl └── Vendor_146b_Product_0d01.kl /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | META-INF/** text eol=lf 3 | *.prop text eol=lf 4 | *.sh text eol=lf 5 | *.md text eol=lf 6 | 7 | # Denote all files that are truly binary and should not be modified. 8 | system/** binary 9 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 1Controller 2 | #### *1 Module to support all Game Controllers.* 3 | 4 | ![alt text](https://i.imgur.com/CODzG0F.png?4) 5 | 6 | ### About: 7 | **This fork adds proper support for Joy-Con**.
8 | This module aims to be an all-in-one module for controllers. 9 | It adds .kl files to fix keybindings on many game controllers. 10 | 11 | ### Compatibility: 12 | - DualShock 2 13 | - DualShock 3 14 | - DualShock 4 15 | - DualSense 16 | - Xbox 360 17 | - Xbox One 18 | - Xbox One S 19 | - Xbox Series X|S 20 | - Switch Pro Controller ??? (not tested yet) 21 | - SWITCH JOY-CON 22 | - Nacon REVOLUTION PRO CONTROLLER 23 | - Zeemote SteelSeries FREE 24 | 25 | ### Known Issues: 26 | - High delay when Dualshock 4 with Bluetooth (Seems to be a problem with the controller itself). 27 | - Doesn't work on MIUI 10 devices. 28 | 29 | #### [XDA Thread](https://forum.xda-developers.com/t/module-1controller-1-module-to-support-all-game-controllers.3865889/) 30 | 31 | ### Credits: 32 | - [JaqFb](https://forum.xda-developers.com/member.php?u=7445450) for providing DS4 keylayouts. 33 | - [KeiranGinge](https://forum.xda-developers.com/member.php?u=9642932) for helping with DS4 mappings. 34 | - [djsmax](https://github.com/djsmax) for many many fixes and changes. 35 | - [Black-Seraph](https://github.com/Black-Seraph) for Pro Controller Keylayout from CleanRom (GPD XD+). 36 | - [MattMasc](https://github.com/MattMasc) for DualShock 2 Keylayout. 37 | - [RuiGuilherme](https://github.com/RuiGuilherme) for Xbox Series X|S. 38 | - [s1w2a3](https://github.com/s1w2a3) for Joy-Con. 39 | 40 | 41 | ### Changelog ("-" means that it was done on the original repo OneController): 42 | - **-1.0:** Initial GitHub Release. 43 | - **-1.1:** Added Dualshock 3 support. 44 | - **-1.2:** Fixed some DS4 mappings. 45 | - **-1.2.1:** Updated to Magisk v19 template. 46 | - **-1.3.0:** Merged [djsmax](https://github.com/djsmax) changes. 47 | - **-1.4:** Added Switch Pro Controller Support ???. 48 | - **-1.4.1:** Added Xbox 360 Controller (vid_045e&pid_028e) support. 49 | - **-1.4.2** Added Nacon REVOLUTION PRO CONTROLLER. ([Moe-Baker](https://github.com/Moe-Baker)) 50 | - **-1.4.3:** Updated to Magisk v20 template. 51 | - **-1.5.0:** Added support for DualSense and Zeemote SteelSeries FREE controllers. 52 | - **-1.5.1:** Added support for DualShock 2. ([MattMasc](https://github.com/MattMasc)) 53 | - **-1.5.2:** Added support for Xbox Series X|S. ([RuiGuilherme](https://github.com/RuiGuilherme)) 54 | - **1.0.0:** Added support for Joy-Con ([s1w2a3](https://github.com/s1w2a3)) 55 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=OneControllerPlus 2 | name=OneControllerPlus - 1 Module to support all Controllers. 3 | version=v1.0.0 4 | versionCode=100 5 | author=Electric1447 and s1w2a3 6 | description=This module adds .kl file (keylayout) for Dualshock 4/3, Xbox Series X|S, Xbox One/S, Xbox 360, Switch Pro Controller and Joy-Con. 7 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_0079_Product_0011.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 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 | # Classic [S]NES Controller 16 | 17 | key 288 BUTTON_X 18 | key 289 BUTTON_A 19 | key 290 BUTTON_B 20 | key 291 BUTTON_Y 21 | key 292 BUTTON_L1 22 | key 293 BUTTON_R1 23 | key 297 BUTTON_START 24 | key 296 BUTTON_SELECT 25 | 26 | axis 0x00 HAT_X 27 | axis 0x01 HAT_Y 28 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_028e.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 360 USB Controller 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 317 BUTTON_THUMBL 26 | key 318 BUTTON_THUMBR 27 | 28 | # Left and right stick. 29 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 30 | # This confuses applications that rely on the flat value because the joystick actually 31 | # settles in a flat range of +/- 4096 or so. 32 | axis 0x00 X flat 4096 33 | axis 0x01 Y flat 4096 34 | axis 0x03 Z flat 4096 35 | axis 0x04 RZ flat 4096 36 | 37 | # Triggers. 38 | axis 0x02 LTRIGGER 39 | axis 0x05 RTRIGGER 40 | 41 | # Hat. 42 | axis 0x10 HAT_X 43 | axis 0x11 HAT_Y 44 | 45 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt 46 | # Button labeled as "BACK" (left-pointing triangle) 47 | key 314 BUTTON_SELECT 48 | 49 | # The branded "X" button in the center of the controller 50 | key 316 BUTTON_MODE 51 | 52 | # Button labeled as "START" (right-pointing triangle) 53 | key 315 BUTTON_START -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_028f.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 360 USB Controller (Wireless Receiver?) 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_0291.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 360 USB Controller (Wireless Receiver?) 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02a1.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 360 Wireless Receiver for Windows 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02d1.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 360 USB Controller (XBox One?) 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02e0.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 One Controller (2016) 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 306 BUTTON_X 22 | key 307 BUTTON_Y 23 | key 308 BUTTON_L1 24 | key 309 BUTTON_R1 25 | key 310 BUTTON_SELECT 26 | key 311 BUTTON_START 27 | key 139 HOME 28 | key 312 BUTTON_THUMBL 29 | key 313 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02e3.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 One Elite Controller 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 306 BUTTON_X 22 | key 307 BUTTON_Y 23 | key 308 BUTTON_L1 24 | key 309 BUTTON_R1 25 | key 310 BUTTON_SELECT 26 | key 311 BUTTON_START 27 | key 139 HOME 28 | key 312 BUTTON_THUMBL 29 | key 313 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02e6.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 | # Wireless XBox Controller Dongle 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 306 BUTTON_X 22 | key 307 BUTTON_Y 23 | key 308 BUTTON_L1 24 | key 309 BUTTON_R1 25 | key 310 BUTTON_SELECT 26 | key 311 BUTTON_START 27 | key 139 HOME 28 | key 312 BUTTON_THUMBL 29 | key 313 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02ea.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 One Controller (2017) Wired 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 158 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 172 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x02 Z flat 4096 38 | axis 0x05 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x09 RTRIGGER 42 | axis 0x0a LTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_02fd.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 One Controller (2017) Bluetooth 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 158 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 172 HOME 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x02 Z flat 4096 38 | axis 0x05 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x09 RTRIGGER 42 | axis 0x0a LTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_0719.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 | # XBox 360 USB Wireless Controller 16 | # Reports itself as "Xbox 360 Wireless Receiver" and 17 | # "Microsoft Corp. Xbox 360 Wireless Adapter" 18 | # Similar in behavior to XBox 360 USB Controller except for the d-pad, 19 | # which is digital (scan codes instead of axes) on the wireless version. 20 | 21 | key 304 BUTTON_A 22 | key 305 BUTTON_B 23 | key 307 BUTTON_X 24 | key 308 BUTTON_Y 25 | key 310 BUTTON_L1 26 | key 311 BUTTON_R1 27 | key 314 BUTTON_SELECT 28 | key 315 BUTTON_START 29 | key 316 HOME 30 | key 317 BUTTON_THUMBL 31 | key 318 BUTTON_THUMBR 32 | 33 | # Left and right stick. 34 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 35 | # This confuses applications that rely on the flat value because the joystick actually 36 | # settles in a flat range of +/- 4096 or so. 37 | axis 0x00 X flat 4096 38 | axis 0x01 Y flat 4096 39 | axis 0x03 Z flat 4096 40 | axis 0x04 RZ flat 4096 41 | 42 | # Triggers. 43 | axis 0x02 LTRIGGER 44 | axis 0x05 RTRIGGER 45 | 46 | # Hat. 47 | # (D-pad is reported as digital. Each direction has a scan code.) 48 | key 0x2c0 DPAD_LEFT 49 | key 0x2c1 DPAD_RIGHT 50 | key 0x2c2 DPAD_UP 51 | key 0x2c3 DPAD_DOWN -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_0b12.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 X/S Controller = 1914 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 BUTTON_MODE 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_045e_Product_0b13.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 X/S wireless controller, model # 1914, QAU-00002, bought early 2023 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT # center left button with "overlapping windows" icon. Normally: BUTTON_SELECT 26 | key 315 BUTTON_START # center right button with "hamburger" icon. Normally: BUTTON_START 27 | key 316 BUTTON_MODE # big Xbox logo center top button. Normally: BUTTON_MODE 28 | key 167 BACK # center bottom button with an "eject" icon. Normally: ??? 29 | key 317 BUTTON_THUMBL # normally: BUTTON_THUMBL 30 | key 318 BUTTON_THUMBR # normally: BUTTON_THUMBR 31 | 32 | # Left and right stick. 33 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 34 | # This confuses applications that rely on the flat value because the joystick actually 35 | # settles in a flat range of +/- 4096 or so. 36 | axis 0x00 X flat 4096 37 | axis 0x01 Y flat 4096 38 | axis 0x02 Z flat 4096 39 | axis 0x05 RZ flat 4096 40 | 41 | # Triggers. 42 | axis 0x09 LTRIGGER 43 | axis 0x0A RTRIGGER 44 | 45 | # Hat. 46 | axis 0x10 HAT_X 47 | axis 0x11 HAT_Y 48 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_046d_Product_c211.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 | # Old Logitech WingMan RumblePad 17 | # 18 | 19 | # key 103 DPAD_UP 20 | # key 105 DPAD_LEFT 21 | # key 106 DPAD_RIGHT 22 | # key 108 DPAD_DOWN 23 | 24 | 25 | key 288 BUTTON_A 26 | key 289 BUTTON_B 27 | key 291 BUTTON_X 28 | key 292 BUTTON_Y 29 | key 294 BUTTON_L1 30 | key 295 BUTTON_R1 31 | key 297 MENU # Normally: BUTTON_L2 32 | key 298 HOME # Normally: BUTTON_R2 33 | key 296 BUTTON_START 34 | key 290 BUTTON_SELECT # Normally: BUTTON_C 35 | key 293 ESCAPE # Normally: BUTTON_Z 36 | 37 | # Left and right stick. 38 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 39 | # This confuses applications that rely on the flat value because the joystick actually 40 | # settles in a flat range of +/- 4096 or so. 41 | axis 0x00 X flat 4096 # OK 42 | axis 0x01 Y flat 4096 # OK 43 | axis 0x05 Z flat 4096 # OK 44 | axis 0x06 RZ flat 4096 # OK 45 | 46 | axis 0x02 THROTTLE flat 4096 # OK 47 | 48 | 49 | # This actually controls the DPAD 50 | axis 0x10 HAT_X 51 | axis 0x11 HAT_Y 52 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_054c_Product_0268.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 | # 18 | 19 | key 0x124 DPAD_UP 20 | key 0x125 DPAD_RIGHT 21 | key 0x126 DPAD_DOWN 22 | key 0x127 DPAD_LEFT 23 | 24 | key 0x120 BUTTON_SELECT 25 | key 0x123 BUTTON_START 26 | key 0x12e BUTTON_A 27 | key 0x12d BUTTON_B 28 | key 0x12f BUTTON_X 29 | key 0x12c BUTTON_Y 30 | key 0x12a BUTTON_L1 31 | key 0x12b BUTTON_R1 32 | key 0x128 BUTTON_L2 33 | key 0x129 BUTTON_R2 34 | key 0x121 BUTTON_THUMBL 35 | key 0x122 BUTTON_THUMBR 36 | 37 | # PS key 38 | key 0x2c0 HOME 39 | 40 | # Left Analog Stick 41 | axis 0x00 X 42 | axis 0x01 Y 43 | 44 | # Right Analog Stick 45 | axis 0x02 Z 46 | axis 0x05 RZ 47 | 48 | # DPAD 49 | # axis 0x2c -HAT_Y 50 | # axis 0x2d +HAT_X 51 | # axis 0x2e +HAT_Y 52 | # axis 0x2f -HAT_X 53 | 54 | # L2 trigger 55 | axis 0x30 LTRIGGER 56 | 57 | # R2 trigger 58 | axis 0x31 RTRIGGER 59 | 60 | # L1 trigger 61 | # axis 0x32 62 | 63 | # R1 trigger 64 | # axis 0x33 65 | 66 | # Triangle 67 | # axis 0x34 68 | 69 | # Circle 70 | # axis 0x35 71 | 72 | # Cross 73 | # axis 0x36 74 | 75 | # Square 76 | # axis 0x37 77 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_054c_Product_05c4.kl: -------------------------------------------------------------------------------- 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 | # Sony Playstation(R) DualShock 4 Controller 17 | # 18 | 19 | 20 | # Mapping according to https://developer.android.com/traini...ler-input.html 21 | 22 | # Square 23 | key 0x130 BUTTON_X 24 | # Cross 25 | key 0x131 BUTTON_A 26 | # Circle 27 | key 0x132 BUTTON_B 28 | # Triangle 29 | key 0x133 BUTTON_Y 30 | 31 | key 0x134 BUTTON_L1 32 | key 0x135 BUTTON_R1 33 | key 0x136 BUTTON_L2 34 | key 0x137 BUTTON_R2 35 | 36 | # L2 axis 37 | axis 0x03 LTRIGGER 38 | # R2 axis 39 | axis 0x04 RTRIGGER 40 | 41 | 42 | # Left Analog Stick 43 | axis 0x00 X 44 | axis 0x01 Y 45 | # Right Analog Stick 46 | axis 0x02 Z 47 | axis 0x05 RZ 48 | 49 | # Left stick click 50 | key 0x13a BUTTON_THUMBL 51 | # Right stick click 52 | key 0x13b BUTTON_THUMBR 53 | 54 | # Hat 55 | axis 0x10 HAT_X 56 | axis 0x11 HAT_Y 57 | 58 | # Mapping according to https://www.kernel.org/doc/Documenta...ut/gamepad.txt 59 | # Share 60 | key 0x138 BUTTON_SELECT 61 | # Options 62 | key 0x139 BUTTON_START 63 | 64 | # PS key 65 | key 0x13c BUTTON_MODE 66 | 67 | # Touchpad press 68 | # The touchpad for this joystick will become a separate input device in future releases 69 | # and this button will be equivalent to left mouse button 70 | # Therefore, map it to KEYCODE_BUTTON_1 here to allow apps to still handle this on earlier versions 71 | key 0x13d BUTTON_1 -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_054c_Product_09cc.kl: -------------------------------------------------------------------------------- 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 | # Sony Playstation(R) DualShock 4 Controller 17 | # 18 | 19 | 20 | # Mapping according to https://developer.android.com/traini...ler-input.html 21 | 22 | # Square 23 | key 0x130 BUTTON_X 24 | # Cross 25 | key 0x131 BUTTON_A 26 | # Circle 27 | key 0x132 BUTTON_B 28 | # Triangle 29 | key 0x133 BUTTON_Y 30 | 31 | key 0x134 BUTTON_L1 32 | key 0x135 BUTTON_R1 33 | key 0x136 BUTTON_L2 34 | key 0x137 BUTTON_R2 35 | 36 | # L2 axis 37 | axis 0x03 LTRIGGER 38 | # R2 axis 39 | axis 0x04 RTRIGGER 40 | 41 | 42 | # Left Analog Stick 43 | axis 0x00 X 44 | axis 0x01 Y 45 | # Right Analog Stick 46 | axis 0x02 Z 47 | axis 0x05 RZ 48 | 49 | # Left stick click 50 | key 0x13a BUTTON_THUMBL 51 | # Right stick click 52 | key 0x13b BUTTON_THUMBR 53 | 54 | # Hat 55 | axis 0x10 HAT_X 56 | axis 0x11 HAT_Y 57 | 58 | # Mapping according to https://www.kernel.org/doc/Documenta...ut/gamepad.txt 59 | # Share 60 | key 0x138 BUTTON_SELECT 61 | # Options 62 | key 0x139 BUTTON_START 63 | 64 | # PS key 65 | key 0x13c BUTTON_MODE 66 | 67 | # Touchpad press 68 | # The touchpad for this joystick will become a separate input device in future releases 69 | # and this button will be equivalent to left mouse button 70 | # Therefore, map it to KEYCODE_BUTTON_1 here to allow apps to still handle this on earlier versions 71 | key 0x13d BUTTON_1 -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_054c_Product_0ce6.kl: -------------------------------------------------------------------------------- 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 | # Sony Playstation(R) DualSense Controller 17 | # 18 | 19 | 20 | # Mapping according to https://developer.android.com/traini...ler-input.html 21 | 22 | # Square 23 | key 0x130 BUTTON_X 24 | # Cross 25 | key 0x131 BUTTON_A 26 | # Circle 27 | key 0x132 BUTTON_B 28 | # Triangle 29 | key 0x133 BUTTON_Y 30 | 31 | key 0x134 BUTTON_L1 32 | key 0x135 BUTTON_R1 33 | key 0x136 BUTTON_L2 34 | key 0x137 BUTTON_R2 35 | 36 | # L2 axis 37 | axis 0x03 LTRIGGER 38 | # R2 axis 39 | axis 0x04 RTRIGGER 40 | 41 | 42 | # Left Analog Stick 43 | axis 0x00 X 44 | axis 0x01 Y 45 | # Right Analog Stick 46 | axis 0x02 Z 47 | axis 0x05 RZ 48 | 49 | # Left stick click 50 | key 0x13a BUTTON_THUMBL 51 | # Right stick click 52 | key 0x13b BUTTON_THUMBR 53 | 54 | # Hat 55 | axis 0x10 HAT_X 56 | axis 0x11 HAT_Y 57 | 58 | # Mapping according to https://www.kernel.org/doc/Documenta...ut/gamepad.txt 59 | # Share 60 | key 0x138 BUTTON_SELECT 61 | # Options 62 | key 0x139 BUTTON_START 63 | 64 | # PS key 65 | key 0x13c BUTTON_MODE 66 | 67 | # Touchpad press 68 | # The touchpad for this joystick will become a separate input device in future releases 69 | # and this button will be equivalent to left mouse button 70 | # Therefore, map it to KEYCODE_BUTTON_1 here to allow apps to still handle this on earlier versions 71 | key 0x13d BUTTON_1 -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_057e_Product_2006.kl: -------------------------------------------------------------------------------- 1 | key 309 BUTTON_MODE 2 | key 314 BUTTON_SELECT 3 | key 317 BUTTON_THUMBL 4 | key 310 BUTTON_L1 5 | key 312 BUTTON_L2 6 | key 544 DPAD_UP 7 | key 545 DPAD_DOWN 8 | key 546 DPAD_LEFT 9 | key 547 DPAD_RIGHT 10 | 11 | axis 0x00 X 12 | axis 0x01 Y -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_057e_Product_2007.kl: -------------------------------------------------------------------------------- 1 | # Device name: Nintendo Switch Right Joy-Con 2 | # Device id : Vendor_057e_Product_2007 3 | 4 | # key 5 | # key 304 BUTTON_A 6 | key 304 BUTTON_B 7 | # key 305 BUTTON_B 8 | key 305 BUTTON_A 9 | # key 307 BUTTON_X 10 | key 307 BUTTON_X 11 | # key 308 BUTTON_Y 12 | key 308 BUTTON_Y 13 | key 311 BUTTON_R1 14 | key 313 BUTTON_R2 15 | key 318 BUTTON_THUMBR 16 | key 315 BUTTON_START 17 | key 316 HOME 18 | 19 | # axis 20 | axis 0x03 Z 21 | axis 0x04 RZ 22 | 23 | # keyboard 24 | # key -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_057e_Product_2009.kl: -------------------------------------------------------------------------------- 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 | # Nintendo Switch Pro Controller - HAC-013 - Bluetooth 17 | # 18 | 19 | 20 | # Mapping according to https://developer.android.com/training/game-controllers/controller-input.html 21 | 22 | # Button labeled as "Y" but should really produce keycode "X" 23 | key 0x132 BUTTON_X 24 | # Button labeled as "B" but should really produce keycode "A" 25 | key 0x130 BUTTON_A 26 | # Button labeled as "A" but should really produce keycode "B" 27 | key 0x131 BUTTON_B 28 | # Button labeled as "X" but should really product keycode "Y" 29 | key 0x133 BUTTON_Y 30 | 31 | # Button labeled as "L" 32 | key 0x134 BUTTON_L1 33 | # Button labeled as "R" 34 | key 0x135 BUTTON_R1 35 | 36 | # No LT / RT axes on this controller. Instead, there are keys. 37 | # Trigger labeled as "ZL" 38 | key 0x136 BUTTON_L2 39 | # Trigger labeled as "ZR" 40 | key 0x137 BUTTON_R2 41 | 42 | # Left Analog Stick 43 | axis 0x00 X 44 | axis 0x01 Y 45 | # Right Analog Stick 46 | axis 0x03 Z 47 | axis 0x04 RZ 48 | 49 | # Left stick click (generates linux BTN_SELECT) 50 | key 0x13a BUTTON_THUMBL 51 | # Right stick click (generates linux BTN_START) 52 | key 0x13b BUTTON_THUMBR 53 | 54 | # Hat 55 | axis 0x10 HAT_X 56 | axis 0x11 HAT_Y 57 | 58 | # Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt 59 | # Minus 60 | key 0x138 BUTTON_SELECT 61 | # Plus 62 | key 0x139 BUTTON_START 63 | 64 | # Circle 65 | key 0x13d BUTTON_MODE 66 | 67 | # Home key 68 | key 0x13c HOME 69 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_0810_Product_0001.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 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) DualShock 2 Controller 17 | # 18 | 19 | key 296 BUTTON_SELECT 20 | key 297 BUTTON_START 21 | key 290 BUTTON_A 22 | key 289 BUTTON_B 23 | key 291 BUTTON_X 24 | key 288 BUTTON_Y 25 | key 294 BUTTON_L1 26 | key 295 BUTTON_R1 27 | key 292 BUTTON_L2 28 | key 293 BUTTON_R2 29 | key 298 BUTTON_THUMBL 30 | key 299 BUTTON_THUMBR 31 | 32 | axis 0x00 X 33 | axis 0x01 Y 34 | 35 | axis 0x05 Z 36 | axis 0x02 RZ 37 | 38 | axis 0x10 HAT_X 39 | axis 0x11 HAT_Y 40 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_0e6f_Product_02e3.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 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 | # PDP Wired Controller for Xbox Series X/S 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 314 BUTTON_SELECT 26 | key 315 BUTTON_START 27 | key 316 BUTTON_MODE 28 | key 317 BUTTON_THUMBL 29 | key 318 BUTTON_THUMBR 30 | 31 | # Left and right stick. 32 | # The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. 33 | # This confuses applications that rely on the flat value because the joystick actually 34 | # settles in a flat range of +/- 4096 or so. 35 | axis 0x00 X flat 4096 36 | axis 0x01 Y flat 4096 37 | axis 0x03 Z flat 4096 38 | axis 0x04 RZ flat 4096 39 | 40 | # Triggers. 41 | axis 0x02 LTRIGGER 42 | axis 0x05 RTRIGGER 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y 47 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_1038_Porduct_1412.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 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 | # Zeemote: SteelSeries FREE 17 | # 18 | 19 | key 304 BUTTON_A 20 | key 305 BUTTON_B 21 | key 307 BUTTON_X 22 | key 308 BUTTON_Y 23 | key 310 BUTTON_L1 24 | key 311 BUTTON_R1 25 | key 315 BUTTON_START 26 | key 316 BUTTON_SELECT 27 | 28 | axis 0x00 X 29 | axis 0x01 Y 30 | axis 0x02 Z 31 | axis 0x05 RZ 32 | axis 0x10 HAT_X 33 | axis 0x11 HAT_Y 34 | -------------------------------------------------------------------------------- /system/usr/keylayout/Vendor_146b_Product_0d01.kl: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 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 Dualshock 4 17 | # 18 | 19 | key 305 BUTTON_A # Cross 20 | key 306 BUTTON_B # Circle 21 | key 304 BUTTON_X # Square 22 | key 307 BUTTON_Y # Triangle 23 | key 308 BUTTON_L1 # L1 24 | key 309 BUTTON_R1 # R1 25 | key 310 BUTTON_L2 # L2 26 | key 311 BUTTON_R2 # R2 27 | key 312 BUTTON_SELECT # Select / Share 28 | key 313 BUTTON_START # Start / Options 29 | key 316 HOME # PS Home 30 | key 314 BUTTON_THUMBL # L3 31 | key 315 BUTTON_THUMBR # R3 32 | key 317 BACK # Touchpad Press 33 | 34 | # Left and right stick. 35 | axis 0x00 X flat 0 36 | axis 0x01 Y flat 0 37 | axis 0x02 Z flat 0 38 | axis 0x05 RZ flat 0 39 | 40 | # Triggers. 41 | axis 0x09 GAS 42 | axis 0x0a BRAKE 43 | 44 | # Hat. 45 | axis 0x10 HAT_X 46 | axis 0x11 HAT_Y --------------------------------------------------------------------------------