aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kling <webgeek1234@gmail.com>2019-05-09 21:18:16 -0500
committerAaron Kling <webgeek1234@gmail.com>2019-08-14 08:56:24 -0500
commit25a3dec21a883b9761b1c562c84e0c9e44f68326 (patch)
treead28908c8fd4727985acace86cc91a1395400719
parent64ed71de056176409ad2eabba5e42b3c12a12b7d (diff)
downloadandroid_device_lineage_atv-25a3dec21a883b9761b1c562c84e0c9e44f68326.tar.gz
android_device_lineage_atv-25a3dec21a883b9761b1c562c84e0c9e44f68326.tar.bz2
android_device_lineage_atv-25a3dec21a883b9761b1c562c84e0c9e44f68326.zip
Add steam controller key layouts
Needed to use the steam controller with the steam link app Change-Id: I1f901969d5fc68bfd5741ff7550119db92e89ecd
-rw-r--r--keylayout/Android.mk34
-rw-r--r--keylayout/Vendor_28de_Product_1102.kl60
-rw-r--r--keylayout/Vendor_28de_Product_1142.kl60
-rw-r--r--lineage_atv.mk5
4 files changed, 159 insertions, 0 deletions
diff --git a/keylayout/Android.mk b/keylayout/Android.mk
new file mode 100644
index 0000000..815279c
--- /dev/null
+++ b/keylayout/Android.mk
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2018 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_28de_Product_1102.kl
+LOCAL_SRC_FILES := Vendor_28de_Product_1102.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_28de_Product_1142.kl
+LOCAL_SRC_FILES := Vendor_28de_Product_1142.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
diff --git a/keylayout/Vendor_28de_Product_1102.kl b/keylayout/Vendor_28de_Product_1102.kl
new file mode 100644
index 0000000..50cf75a
--- /dev/null
+++ b/keylayout/Vendor_28de_Product_1102.kl
@@ -0,0 +1,60 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Steam Controller
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 307 BUTTON_X
+key 308 BUTTON_Y
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 312 BUTTON_L2
+key 313 BUTTON_R2
+key 315 BUTTON_START
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+key 158 BACK
+key 172 HOME
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 116 POWER
+
+key 103 DPAD_UP
+key 108 DPAD_DOWN
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+
+axis 0x00 X flat 4096
+axis 0x01 Y flat 4096
+axis 0x0a LTRIGGER flat 4096
+axis 0x02 Z flat 4096
+axis 0x05 RZ flat 4096
+axis 0x09 RTRIGGER flat 4096
+
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
+
+axis 0x12 GENERIC_5
+axis 0x13 GENERIC_6
+axis 0x14 GENERIC_7
+
+axis 0x15 GENERIC_8
+axis 0x16 GENERIC_9
+axis 0x17 GENERIC_10
+
+axis 0x18 GENERIC_11
+axis 0x19 GENERIC_12
+axis 0x1a GENERIC_13
+axis 0x1b GENERIC_14
diff --git a/keylayout/Vendor_28de_Product_1142.kl b/keylayout/Vendor_28de_Product_1142.kl
new file mode 100644
index 0000000..50cf75a
--- /dev/null
+++ b/keylayout/Vendor_28de_Product_1142.kl
@@ -0,0 +1,60 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Steam Controller
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 307 BUTTON_X
+key 308 BUTTON_Y
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 312 BUTTON_L2
+key 313 BUTTON_R2
+key 315 BUTTON_START
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+key 158 BACK
+key 172 HOME
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 116 POWER
+
+key 103 DPAD_UP
+key 108 DPAD_DOWN
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+
+axis 0x00 X flat 4096
+axis 0x01 Y flat 4096
+axis 0x0a LTRIGGER flat 4096
+axis 0x02 Z flat 4096
+axis 0x05 RZ flat 4096
+axis 0x09 RTRIGGER flat 4096
+
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
+
+axis 0x12 GENERIC_5
+axis 0x13 GENERIC_6
+axis 0x14 GENERIC_7
+
+axis 0x15 GENERIC_8
+axis 0x16 GENERIC_9
+axis 0x17 GENERIC_10
+
+axis 0x18 GENERIC_11
+axis 0x19 GENERIC_12
+axis 0x1a GENERIC_13
+axis 0x1b GENERIC_14
diff --git a/lineage_atv.mk b/lineage_atv.mk
index 7154655..08e9874 100644
--- a/lineage_atv.mk
+++ b/lineage_atv.mk
@@ -13,3 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
+# Key layouts for steam controller
+PRODUCT_PACKAGES += \
+ Vendor_28de_Product_1102.kl \
+ Vendor_28de_Product_1142.kl