我在 HP Zbook 14u G5 上使用 Ubuntu 22.04。键盘上的 F12 键上有一个日历图像。当我在 Windows 上按下此键时,日历就会启动。但在 Ubuntu 上,此功能不起作用。首先,我更改了配置文件 /lib/udev/hwdb.d/60-keyboard.hwdb。现在,当我按下 F12 时,evtest 显示我正在按下 KEY_CALENDAR。但它仍然没有打开日历。此外,当我按下 F12 时,evtest 输出以下内容:
Event: time 1668852816.960635, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1668852816.960635, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1668852816.960635, -------------- SYN_REPORT ------------
Event: time 1668852816.960745, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668852816.960745, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1668852816.960745, -------------- SYN_REPORT ------------
Event: time 1668852816.960901, type 4 (EV_MSC), code 4 (MSC_SCAN), value 64
Event: time 1668852816.960901, type 1 (EV_KEY), code 397 (KEY_CALENDAR), value 1
Event: time 1668852816.960901, -------------- SYN_REPORT ------------
Event: time 1668852817.021851, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1668852817.021851, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0
Event: time 1668852817.021851, -------------- SYN_REPORT ------------
Event: time 1668852817.021972, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668852817.021972, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
Event: time 1668852817.021972, -------------- SYN_REPORT ------------
Event: time 1668852817.022102, type 4 (EV_MSC), code 4 (MSC_SCAN), value 64
Event: time 1668852817.022102, type 1 (EV_KEY), code 397 (KEY_CALENDAR), value 0
Event: time 1668852817.022102, -------------- SYN_REPORT ------------
但我实际上并没有按下键盘上的 ctrl 和 alt 键。有人能帮我解决一下吗?
答案1
好的,我搞定了。编辑配置文件 /lib/udev/hwdb.d/60-keyboard.hwdb 后,我在 gnome-settings 中添加了一个自定义快捷方式。现在,当我按下日历按钮时,日历一切正常 )