diff --git a/base.mk b/base.mk index f2559dc..ded39dc 100644 --- a/base.mk +++ b/base.mk @@ -111,6 +111,7 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/nokia-soc_gpio_keys.kl:system/phh/nokia-soc_gpio_keys.kl \ 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 \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/google-uinput-fpc.kl b/files/google-uinput-fpc.kl new file mode 100644 index 0000000..c8f0acd --- /dev/null +++ b/files/google-uinput-fpc.kl @@ -0,0 +1,4 @@ +key 106 SYSTEM_NAVIGATION_LEFT +key 108 SYSTEM_NAVIGATION_DOWN +key 103 SYSTEM_NAVIGATION_UP +key 105 SYSTEM_NAVIGATION_RIGHT diff --git a/rw-system.sh b/rw-system.sh index 51edc21..e55b5be 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -135,6 +135,12 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.build.fingerprint |grep -q -e google/;then + cp /system/phh/google-uinput-fpc.kl /mnt/phh/keylayout/uinput-fpc.kl + chmod 0644 /mnt/phh/keylayout/uinput-fpc.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout