Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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.

share|improve this question
    
Actually, it seems somehow some of the keys have bindings. F10 is settings. F1 and F2 open some chinese websites?? –  Josh Sep 14 '12 at 19:06
add comment

1 Answer

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.