BootleggersROM / frameworks_base

Our Frameworks/Base, inspired on various ROMs
Other
13 stars 81 forks source link

Fix: Headset Controls Not Working #48

Open crxssrazr93 opened 5 years ago

crxssrazr93 commented 5 years ago

The Problem: The Volume Up and Volume Down Keys of my Headset; Xiaomi Earphone Mi Hybrid Pro HD 2, did not work on my Redmi 5 Plus build.

Using KeyTest App, I identified that the keys were not mapped to any function.

How to fix;

In /system/usr/keylayout/Generic.kl

Change:

key 257   BUTTON_2
key 258   BUTTON_3

To

#key 257   BUTTON_2
#key 258   BUTTON_3
key 257   VOLUME_UP
key 258   VOLUME_DOWN

Save and reboot.

Should work here after.

crxssrazr93 commented 5 years ago

@crxssrazr93 Isn't this device related No as I checked the base keylayout files and did not find any with those mappings so it shipped right into device roms.

simrat39 commented 5 years ago

Nah I was asking since you opened the issue in fw_b and I didn't mean to comment here anyways , it was supposed to be in telegram 😅

crxssrazr93 commented 5 years ago

fw_b

Lol I opened here since it is related to fw_b itself.

simrat39 commented 5 years ago

actually it should work https://github.com/ManoloRey/device_xiaomi_vince/blob/bootleg/keylayout/msm8953-snd-card-mtp_Button_Jack.kl#L2-L3