Microsoft 人体工学键盘 2019 款(不是旧款 4000 款)为新按键生成了多个按键。众所周知如何重新映射缩放滑块旧版本的问题是如何为新键做到这一点。udev 规则允许为映射条目仅指定一个扫描码,例如KEYBOARD_KEY_0c022d=pageup
。
evtest
以下是Office 键的输出:
Event: time 1604142043.024827, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1604142043.024827, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1604142043.024827, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1
Event: time 1604142043.024827, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 1
Event: time 1604142043.024827, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2
Event: time 1604142043.024827, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1604142043.024827, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e3
Event: time 1604142043.024827, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
这是表情符号键:
Event: time 1604142174.537667, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1604142174.537667, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1604142174.537667, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1
Event: time 1604142174.537667, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 1
Event: time 1604142174.537667, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2
Event: time 1604142174.537667, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1604142174.537667, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e3
Event: time 1604142174.537667, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time 1604142174.537667, -------------- SYN_REPORT ------------
Event: time 1604142174.545449, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7002c
Event: time 1604142174.545449, type 1 (EV_KEY), code 57 (KEY_SPACE), value 1
因此,Office 键仅生成修饰键击键,而 Emoji 键在约 8 毫秒后生成修饰键击键和空格键击键。该键盘上还有其他新的自定义键可生成服务器击键,但是 Office 和 Emoji 键由于其位置而最需要重新映射。