1. 输入命令evtest 查看系统下所有按键、输入设备: root@rk3568:~# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: rk805 pwrkey /dev/input/event1: Lenovo Precision USB Mouse /dev/input/event2: HID 04f3:0103 /dev/input/event3: HID 04f3:0103 Consumer Control /dev/input/event4: HID 04f3:0103 System Control /dev/input/event5: adc-keys /dev/input/event6: rk-headset Select the device event number [0-6]: 2. 按照上面提示选择测试按键,如RK3568 boot按键为 /dev/input/event5: adc-keys 则event number 为 5:按下按键会打印value 1,松开按键则会打印value 0,如下图: {{arm:rk3568:linuxkey.jpg?600|key}} 3. 自定义按键功能,配置文件为: /etc/triggerhappy/triggers.d/example.conf 如下,定义按键为reboot功能,也是系统默认配置,用户可以根据需要自定义 KEY_VOLUMEUP 1 reboot