Need table of key codes for android and presenter

前端 未结 11 892
栀梦
栀梦 2020-12-09 04:19

Can someone point me to the list of key codes that come from getKeyCode() in numeric form so that for example if I look up 72 I see \"]\" and if I look up 24 I see \"vol up\

11条回答
  •  长情又很酷
    2020-12-09 04:52

    The actual standard key-layout is found in /system/usr/keylayout/qwerty.kl within the Android running on the handset. And it is a generic keylayout also.

    key 115   VOLUME_UP         WAKE
    key 114   VOLUME_DOWN       WAKE
    

    From the AOSP source it can be found in sdk/emulator/keymaps/qwerty.kl.

    But bear in mind this, when the source gets compiled along with a device specific keylayout, that will override the standard layout instead so the mileage will vary depending on what the manufacturer has programmed into the keycode for the volume up/down buttons in your case!

提交回复
热议问题