1.frameworks/base/data/keyboards/Generic.kl(键盘布局文件添加键值映射,这里的键值对应kernel里面的键值,按键名字对应上层keycodes.h里面定义的按键名字)
key 490 DOUBLETAP
2.frameworks/base/core/res/res/values/attrs.xml
<enum name="KEYCODE_DOUBLETAP" value="260" />
3.frameworks/native/include/android/keycodes.h
AKEYCODE_DOUBLETAP =260
4.frameworks/native/include/input/InputEventLabels.h
DEFINE_KEYCODE(DOUBLETAP)
5.frameworks/base/core/java/android/view/KeyEvent.java
public static final int KEYCODE_DOUBLETAP = 260;
public static final boolean isSystemKey(int keyCode) {
case KeyEvent.KEYCODE_DOUBLETAP:
}
public static final boolean isWakeKey(int keyCode) {
case KeyEvent.KEYCODE_DOUBLETAP:
}