config: map sec_touchscreen's KEY_HOME to KEY_POWER to fix DT2W
KEY_HOME is only used for DT2W so we can safely remap it to KEY_POWER
Change-Id: If55bff24fcc45fdf34fd4d9663ab5ffd84eac5e8
diff --git a/config/keylayout/sec_touchscreen.kl b/config/keylayout/sec_touchscreen.kl
new file mode 100644
index 0000000..681d319
--- /dev/null
+++ b/config/keylayout/sec_touchscreen.kl
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2020 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.
+#
+
+# Map KEY_HOME to KEY_POWER for DT2W
+key 172 POWER
diff --git a/platform/config.mk b/platform/config.mk
index 7896d42..b25ce28 100644
--- a/platform/config.mk
+++ b/platform/config.mk
@@ -17,6 +17,10 @@
PRODUCT_COPY_FILES += \
$(PLATFORM_PATH)/config/gps/gps_psds.conf:$(TARGET_COPY_OUT_SYSTEM)/etc/gps/gps_psds.conf
+### KEYLAYOUT
+PRODUCT_COPY_FILES += \
+ $(PLATFORM_PATH)/config/keylayout/sec_touchscreen.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/sec_touchscreen.kl
+
### PUBLIC LIBRARIES
PRODUCT_COPY_FILES += \
$(PLATFORM_PATH)/config/linker/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt