From 593055950dfd9b69e39ebb5a3e6276e458160a4e Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 6 Mar 2017 11:47:32 +0100 Subject: [PATCH] scorpio: Add key layouts Change-Id: Iadc7ff689f284f8fe161878d3c50f1dd4eff2d74 --- device.mk | 9 +++++++++ idc/uinput-fpc.idc | 16 ++++++++++++++++ keylayout/atmel-maxtouch.kl | 31 +++++++++++++++++++++++++++++++ keylayout/cyttsp_button.kl | 29 +++++++++++++++++++++++++++++ keylayout/uinput-fpc.kl | 15 +++++++++++++++ 5 files changed, 100 insertions(+) create mode 100644 idc/uinput-fpc.idc create mode 100644 keylayout/atmel-maxtouch.kl create mode 100644 keylayout/cyttsp_button.kl create mode 100644 keylayout/uinput-fpc.kl diff --git a/device.mk b/device.mk index ebe4968..862fe54 100644 --- a/device.mk +++ b/device.mk @@ -20,5 +20,14 @@ $(call inherit-product-if-exists, vendor/xiaomi/scorpio/scorpio-vendor.mk) # Overlay DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay +# Input +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/idc/uinput-fpc.idc:system/usr/idc/uinput-fpc.idc + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/keylayout/atmel-maxtouch.kl:system/usr/keylayout/atmel-maxtouch.kl \ + $(LOCAL_PATH)/keylayout/cyttsp_button.kl:system/usr/keylayout/cyttsp_button.kl \ + $(LOCAL_PATH)/keylayout/uinput-fpc.kl:system/usr/keylayout/uinput-fpc.kl + # Inherit from msm8996-common $(call inherit-product, device/xiaomi/msm8996-common/msm8996.mk) diff --git a/idc/uinput-fpc.idc b/idc/uinput-fpc.idc new file mode 100644 index 0000000..8412e48 --- /dev/null +++ b/idc/uinput-fpc.idc @@ -0,0 +1,16 @@ +# +# FPC1020 Touch sensor driver +# +# Copyright (c) 2013,2014 Fingerprint Cards AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License Version 2 +# as published by the Free Software Foundation. +# + +device.internal = 1 + +keyboard.layout = uinput-fpc +keyboard.builtIn = 1 +keyboard.orientationAware = 1 + diff --git a/keylayout/atmel-maxtouch.kl b/keylayout/atmel-maxtouch.kl new file mode 100644 index 0000000..ed767eb --- /dev/null +++ b/keylayout/atmel-maxtouch.kl @@ -0,0 +1,31 @@ +# Copyright (c) 2014, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +key 139 MENU VIRTUAL +key 102 HOME VIRTUAL +key 158 BACK VIRTUAL +key 143 WAKEUP diff --git a/keylayout/cyttsp_button.kl b/keylayout/cyttsp_button.kl new file mode 100644 index 0000000..092ebf0 --- /dev/null +++ b/keylayout/cyttsp_button.kl @@ -0,0 +1,29 @@ +# Copyright (c) 2015, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +key 139 MENU VIRTUAL +key 158 BACK VIRTUAL diff --git a/keylayout/uinput-fpc.kl b/keylayout/uinput-fpc.kl new file mode 100644 index 0000000..bf5577d --- /dev/null +++ b/keylayout/uinput-fpc.kl @@ -0,0 +1,15 @@ +# +# FPC1020 Touch sensor driver +# +# Copyright (c) 2013,2014 Fingerprint Cards AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License Version 2 +# as published by the Free Software Foundation. +# + +key 96 DPAD_CENTER VIRTUAL +#key 102 HOME +#key 105 DPAD_LEFT +#key 106 DPAD_RIGHT +