evtest
我正在尝试使用以下方法识别 ThinkPad X1C6 上空格键下方(触控板上方)三个按钮的扫描码:evemu-record
。按钮工作正常,但没有报告扫描码。
输出:
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x2 product 0xa version 0x0
Input device name: "TPPS/2 Elan TrackPoint"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 274 (BTN_MIDDLE)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Event code 1 (REL_Y)
Properties:
Property type 0 (INPUT_PROP_POINTER)
Property type 5 (INPUT_PROP_POINTING_STICK)
Testing ... (interrupt to exit)
Event: time 1582630481.910031, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
Event: time 1582630481.910031, -------------- SYN_REPORT ------------
Event: time 1582630482.071378, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
Event: time 1582630482.071378, -------------- SYN_REPORT ------------
Event: time 1582630483.486559, type 1 (EV_KEY), code 273 (BTN_RIGHT), value 1
Event: time 1582630483.486559, -------------- SYN_REPORT ------------
Event: time 1582630483.607941, type 1 (EV_KEY), code 273 (BTN_RIGHT), value 0
Event: time 1582630483.607941, -------------- SYN_REPORT ------------
Event: time 1582630488.204488, type 1 (EV_KEY), code 274 (BTN_MIDDLE), value 1
Event: time 1582630488.204488, -------------- SYN_REPORT ------------
emacs thinkpadEvent: time 1582630488.348561, type 1 (EV_KEY), code 274 (BTN_MIDDLE), value 0
Event: time 1582630488.348561, -------------- SYN_REPORT ------------
如果我能捕获扫描码,我打算将这些按钮重新映射为 CTRL 和 ALT 键,使用udev
hwdb 将这些按钮重新映射为 CTRL 和 ALT 键(如果可能)。
非常希望您能提供一些关于如何在这种情况下获取扫描代码的信息。顺便说一句,我使用的是 Ubuntu 18.04.4,Linux 内核 5.3.0-41-generic。