From ff835cbd539344f4966679c259da0ebd67e4bea1 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 2 Jun 2020 23:04:09 +0200 Subject: [PATCH] Add motorola fingerprint navigation keymap for moto one action --- base.mk | 1 + files/moto-uinput-egis.kl | 14 ++++++++++++++ rw-system.sh | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 files/moto-uinput-egis.kl diff --git a/base.mk b/base.mk index 670e96a..90d659f 100644 --- a/base.mk +++ b/base.mk @@ -116,6 +116,7 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl \ device/phh/treble/files/oppo-touchpanel.kl:system/phh/oppo-touchpanel.kl \ device/phh/treble/files/google-uinput-fpc.kl:system/phh/google-uinput-fpc.kl \ + device/phh/treble/files/moto-uinput-egis.kl:system/phh/moto-uinput-egis.kl \ device/phh/treble/files/daisy-buttonJack.kl:system/phh/daisy-buttonJack.kl \ device/phh/treble/files/daisy-uinput-fpc.kl:system/phh/daisy-uinput-fpc.kl \ device/phh/treble/files/daisy-uinput-goodix.kl:system/phh/daisy-uinput-goodix.kl diff --git a/files/moto-uinput-egis.kl b/files/moto-uinput-egis.kl new file mode 100644 index 0000000..08680ad --- /dev/null +++ b/files/moto-uinput-egis.kl @@ -0,0 +1,14 @@ +# +# ETS320 Touch sensor driver +# +# +# 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. +# + +# ets320 "finger present" +key 618 SYSTEM_NAVIGATION_DOWN +key 619 SYSTEM_NAVIGATION_UP +key 620 SYSTEM_NAVIGATION_LEFT +key 621 SYSTEM_NAVIGATION_RIGHT diff --git a/rw-system.sh b/rw-system.sh index fce8cf2..6a2bba9 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -161,6 +161,12 @@ changeKeylayout() { changed=true fi + if getprop ro.product.vendor.manufacturer |grep -q -e motorola;then + cp /system/phh/moto-uinput-egis.kl /mnt/phh/keylayout/uinput-egis.kl + chmod 0644 /mnt/phh/keylayout/uinput-egis.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout