@zifehng
2017-06-15T11:16:59.000000Z
字数 806
阅读 1659
Android
input
keycode
本文基于mstar828、Android 5.0.1,其他平台仅供参考
......
key 183 F13
......
static const InputEventLabel KEYCODES[] = {
......
DEFINE_KEYCODE(F13),
{ NULL, 0 }
};
enum {
......
AKEYCODE_F13 = 600,
}
<attr>
......
<enum name="KEYCODE_F13" value="600" />
</attr>
public class KeyEvent extends InputEvent implements Parcelable {
......
public static final int KEYCODE_F13 = 600;
......
}
public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) {
......
switch (keyCode) {
case KeyEvent.KEYCODE_F13:{
......
break;
}
......
}
......
}