robertchen
robertchen

Reputation: 461

To find the device name for DEVICE_NAME.kl

According to http://source.android.com/devices/tech/input/key-layout-files.html, android consults key layout files in the following order.

The following paths are consulted in order.

/system/usr/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl /system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl /system/usr/keylayout/DEVICE_NAME.kl /data/system/devices/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl /data/system/devices/keylayout/Vendor_XXXX_Product_XXXX.kl /data/system/devices/keylayout/DEVICE_NAME.kl /system/usr/keylayout/Generic.kl /data/system/devices/keylayout/Generic.kl

How do I know an input device name (DEVICE_NAME)? How to list input device names in adb shell?

Upvotes: 4

Views: 5451

Answers (2)

kangear
kangear

Reputation: 2613

$ adb shell getevent
add device 1: /dev/input/event4
  name:     "USB Optical Mouse"
add device 2: /dev/input/event0
  name:     "rk29-keypad"
add device 3: /dev/input/event3
  name:     "rk_micdet"
add device 4: /dev/input/event2
  name:     "rk_headsetdet"
add device 5: /dev/input/event1
  name:     "rkxx-remotectl"

"USB Optical Mouse","rk29-keypad","rk_micdet" etc are DEVICE_NAME.

Upvotes: 3

dthomasen
dthomasen

Reputation: 826

cat /proc/bus/input/devices

Lists all input devices. Find your keyboard in the list to get the vendor and product ID like:

Bus=0003 Vendor=062a Product=2901 Version=0110

Upvotes: 3

Related Questions