我在我的设备中使用evtest来查看在我的硬键遥控器中按下的一个按钮的键值。

***
^[[15~Event: time 1447340367.872317, type 4 (EV_MSC), code 4 (MSC_SCAN)
Event: time 1447340367.872329, type 1 (EV_KEY), code 63 (KEY_F5), value 1
Event: time 1447340367.872330, -------------- SYN_REPORT ------------
Event: time 1447340367.913953, type 4 (EV_MSC), code 4 (MSC_SCAN)
Event: time 1447340367.913966, type 1 (EV_KEY), code 63 (KEY_F5), value 0
Event: time 1447340367.913967, -------------- SYN_REPORT ------------
^[[AEvent: time 1447340404.421715, type 4 (EV_MSC), code 4 (MSC_SCAN)
Event: time 1447340404.421734, type 1 (EV_KEY), code 103 (KEY_UP), value 1
Event: time 1447340404.421735, -------------- SYN_REPORT ------------
Event: time 1447340404.444706, type 4 (EV_MSC), code 4 (MSC_SCAN)
Event: time 1447340404.444710, type 1 (EV_KEY), code 103 (KEY_UP), value 0

在我的供应商处,同样的输出是
&&&&&&&&&&&
^[[15~Event: time 1447340367.872317, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7003e
Event: time 1447340367.872329, type 1 (EV_KEY), code 63 (KEY_F5), value 1
Event: time 1447340367.872330, -------------- SYN_REPORT ------------
Event: time 1447340367.913953, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7003e
Event: time 1447340367.913966, type 1 (EV_KEY), code 63 (KEY_F5), value 0
Event: time 1447340367.913967, -------------- SYN_REPORT ------------
^[[AEvent: time 1447340404.421715, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1447340404.421734, type 1 (EV_KEY), code 103 (KEY_UP), value 1
Event: time 1447340404.421735, -------------- SYN_REPORT ------------
Event: time 1447340404.444706, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1447340404.444710, type 1 (EV_KEY), code 103 (KEY_UP), value 0

&&&&&&&&&&&
^[[15~Event: time 1447340367.872317, type 4 (EV_MSC), code 4 (MSC_SCAN), **value 7003e**

扫描值不在我的linux设备上,你知道怎么得到它吗?

最佳答案

您可能需要更新系统上evtest的版本。快速浏览evtest的代码可以发现,版本1.27及更高版本总是打印该值;早期版本可能不会这样做。

关于linux - evtest没有给出扫描值,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33731785/

10-10 08:23