2

I'm using an MK802 android device with 4.0.4 and an RC12 2.4ghz keyboard mouse combo. I'm wondering if there is any way to bind specific keys on the keyboard to actions in android?

Specifically it'd be great if I could have a home key, and an application key. Escape seems to perform the back function nicely, but if I could have hardware keys for the rest of the main android functions this setup would feel a lot more comfortable.

1
  • Actually, it seems somehow some of the keys have bindings. F10 is settings. F1 and F2 open some chinese websites??
    – Josh
    Commented Sep 14, 2012 at 19:06

1 Answer 1

3

I have spoken with the Measy the manufacturer of the RC12, they claim their .kl for the RC12 is proprietary, so I was unable to get an actual layout to install in the system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl

In order to map the keyboard/KeyEvents you need to figure out the Vendor# and Product# of any USB keyboard/mouse device.

adb shell dmesg | grep usb

This gives you the Vendor/Product#s. Now you generate your own .kl file. My suggestion is to use the Generic.kl file in the /system/usr/keylayout/Generic.kl for reference.

adb pull /system/usr/keylayout/Generic.kl

Then modify it as you see fit and CHANGE the name to /Vendor_XXXX_Product_XXXX.kl

adb push /system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl
adb reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .