代码路径:
frameworks/base/data/keyboards/Generic.kl
frameworks/base/data/keyboards/qwerty.kl
/device/sprd/sharkle/common/rootdir/system/usr/keylayout/gpio-keys.kl
frameworks/native/include/input/KeycodeLabels.h
frameworks/native/include/android/keycodes.h
frameworks/base/core/java/android/view/KeyEvent.java
frameworks/base/core/res/res/values/attrs.xml
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
kernel/arch/arm/boot/dts/sp9820e-1h10-native.dts
在内核设备数sp9820e-1h10-native.dts文件中定义了驱动里面的值
gpio_keys {
compatible = “gpio-keys”;
input-name = “sprd-gpio-keys”;
status = “ok”;
key_power {
label = "Power Key";
linux,code = <116>;
gpios = <&pmic_eic 1 1>;
debounce-interval = <5>;
gpio-key,wakeup;
gpio-key,level-trigger;
};
key_next {
label = "next Key";
linux,code = <301>;
gpios = <&ap_gpio 124 1>;
gpio-key,wakeup;
};
key_ok {
label = "ok Key";
linux,code = <302>;
gpios = <&ap_gpio 125 1>;
gpio-key,wakeup;
};
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19