diff --git a/base.mk b/base.mk index a14ae45..af27de5 100644 --- a/base.mk +++ b/base.mk @@ -133,7 +133,8 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/zf6-googlekey_input.kl:system/phh/zf6-googlekey_input.kl \ device/phh/treble/files/teracube2e-mtk-kpd.kl:system/phh/teracube2e-mtk-kpd.kl \ device/phh/treble/files/bv9500plus-mtk-kpd.kl:system/phh/bv9500plus-mtk-kpd.kl \ - device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl + device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl \ + device/phh/treble/files/tecno-touchpanel.kl:system/phh/tecno-touchpanel.kl \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/tecno-touchpanel.kl b/files/tecno-touchpanel.kl new file mode 100644 index 0000000..f5fc0ce --- /dev/null +++ b/files/tecno-touchpanel.kl @@ -0,0 +1 @@ +key 183 WAKEUP diff --git a/rw-system.sh b/rw-system.sh index eedf5f7..2173b91 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -296,6 +296,14 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.build.fingerprint |grep -iq tecno/kd7;then + # Enable dt2w + echo cc1 > /proc/gesture_function + cp /system/phh/tecno-touchpanel.kl /mnt/phh/keylayout/mtk-tpd.kl + chmod 0644 /mnt/phh/keylayout/mtk-tpd.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout