From df889fc6050426a24f2417522ec9c8ab14c5d32f Mon Sep 17 00:00:00 2001 From: guaiyihu Date: Sat, 26 May 2018 18:27:47 +0800 Subject: [PATCH] clover: keylayout: Map Button Jack keylayout to fix headset button controls * input: sdm660-snd-card Button Jack as /devices/soc/soc:sound/sound/card0/input8 Change-Id: I26b4f9dd54856e4b43b9c79c81873641c7b7082b --- configs/keylayout/sdm660-snd-card_Button_Jack.kl | 3 +++ device.mk | 4 ++++ keylayout/uinput-fpc.kl | 8 -------- 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 configs/keylayout/sdm660-snd-card_Button_Jack.kl delete mode 100644 keylayout/uinput-fpc.kl diff --git a/configs/keylayout/sdm660-snd-card_Button_Jack.kl b/configs/keylayout/sdm660-snd-card_Button_Jack.kl new file mode 100644 index 0000000..19ee67a --- /dev/null +++ b/configs/keylayout/sdm660-snd-card_Button_Jack.kl @@ -0,0 +1,3 @@ +key 226 HEADSETHOOK +key 257 VOLUME_UP +key 258 VOLUME_DOWN diff --git a/device.mk b/device.mk index 6fe5fd8..5607ee2 100644 --- a/device.mk +++ b/device.mk @@ -50,6 +50,10 @@ $(call inherit-product, $(DEVICE_PATH)/device_prop.mk) PRODUCT_COPY_FILES += \ $(DEVICE_PATH)/media/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml +# Keylayout +PRODUCT_COPY_FILES += \ + $(DEVICE_PATH)/configs/keylayout/sdm660-snd-card_Button_Jack.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/sdm660-snd-card_Button_Jack.kl + # Permissions PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml diff --git a/keylayout/uinput-fpc.kl b/keylayout/uinput-fpc.kl deleted file mode 100644 index f02e8ec..0000000 --- a/keylayout/uinput-fpc.kl +++ /dev/null @@ -1,8 +0,0 @@ -################################## -# -#add for fpc fingerprints -# -################################## - -key 172 HOME VIRTUAL -