From c6d441ef2e21f1e144a6fa220e8d5961394913a9 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 5 Aug 2020 20:38:12 +0200 Subject: [PATCH] Add fingerprint gestures on zf6 --- base.mk | 4 +++- files/zf6-goodixfp.kl | 6 ++++++ files/zf6-googlekey_input.kl | 1 + rw-system.sh | 8 ++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 files/zf6-goodixfp.kl create mode 100644 files/zf6-googlekey_input.kl diff --git a/base.mk b/base.mk index 28325b4..cad14e4 100644 --- a/base.mk +++ b/base.mk @@ -121,7 +121,9 @@ PRODUCT_COPY_FILES += \ 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 \ - device/phh/treble/files/nubia-nubia_synaptics_dsx.kl:system/phh/nubia-nubia_synaptics_dsx.kl + device/phh/treble/files/nubia-nubia_synaptics_dsx.kl:system/phh/nubia-nubia_synaptics_dsx.kl \ + device/phh/treble/files/zf6-goodixfp.kl:system/phh/zf6-goodixfp.kl \ + device/phh/treble/files/zf6-googlekey_input.kl:system/phh/zf6-googlekey_input.kl \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/zf6-goodixfp.kl b/files/zf6-goodixfp.kl new file mode 100644 index 0000000..3f7bef9 --- /dev/null +++ b/files/zf6-goodixfp.kl @@ -0,0 +1,6 @@ +key 0x6c SYSTEM_NAVIGATION_DOWN +key 0x67 SYSTEM_NAVIGATION_UP +key 0x69 SYSTEM_NAVIGATION_LEFT +key 0x6a SYSTEM_NAVIGATION_RIGHT + + diff --git a/files/zf6-googlekey_input.kl b/files/zf6-googlekey_input.kl new file mode 100644 index 0000000..59ab4bb --- /dev/null +++ b/files/zf6-googlekey_input.kl @@ -0,0 +1 @@ +key 0x248 ASSIST diff --git a/rw-system.sh b/rw-system.sh index 7327136..304032c 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -175,6 +175,14 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.asus.build.fp |grep -q ASUS_I01WD;then + cp /system/phh/zf6-goodixfp.kl /mnt/phh/keylayout/goodixfp.kl + cp /system/phh/zf6-googlekey_input.kl /mnt/phh/keylayout/googlekey_input.kl + chmod 0644 /mnt/phh/keylayout/goodixfp.kl + chmod 0644 /mnt/phh/keylayout/googlekey_input.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout