我使用的是 Dell Latitude D620。每当我按下空格键时,向下箭头键也会被触发并执行其操作。以下是日志:
KeyPress event, serial 30, synthetic NO, window 0x3200001,
root 0x10c, subw 0x0, time 2248017, (70,-9), root:(76,39),
state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x3200001,
root 0x10c, subw 0x0, time 2248018, (70,-9), root:(76,39),
state 0x0, keycode 65 (keysym 0x20, space), same_screen YES,
XLookupString gives 1 bytes: (20) " "
XmbLookupString gives 1 bytes: (20) " "
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x3200001,
root 0x10c, subw 0x0, time 2248083, (70,-9), root:(76,39),
state 0x0, keycode 65 (keysym 0x20, space), same_screen YES,
XLookupString gives 1 bytes: (20) " "
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x3200001,
root 0x10c, subw 0x0, time 2248085, (70,-9), root:(76,39),
state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
ClientMessage event, serial 33, synthetic YES, window 0x3200001,
message_type 0x157 (WM_PROTOCOLS), format 32, message 0x155 (WM_DELETE_WINDOW)
上面的日志是关于按下并释放按键的Space bar。我想知道如何修复它。谢谢。
答案1
- 转到您的主目录。
光盘〜
- 创建/打开文件
.Xmodmap
。
vim .Xmodmap
- 添加以下行。
键码 65 = 空格 键码 116 = 向下
注销并重新登录。
自动重复功能可能缺失。要修复此问题,请运行:
xset r 66
- 要在每次登录时运行它,请将其添加到文件底部:
/etc/X11/Xsession.d/50x11-common_determine-startup
。
笔记:我假设空格键的键码为 65,向下键的键码为 116。