我的左手小指有些问题。所以我尝试重新映射按键,如下所示:
用Ctrl按钮。那部分我搞定了。现在我想把那个键放在大写锁定键上。那是我卡住的部分。
这是我的 xmodmap 文件:
clear control
keycode 35 = Control_R
add control = Control_R Control_L
clear Lock
keycode 66 = dead_diaeresis
这就是xev
当前按下图中按键时显示的内容:
KeyPress event, serial 29, synthetic NO, window 0x3000001,
root 0xc3, subw 0x0, time 11475613, (392,225), root:(393,308),
state 0x0, keycode 35 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x3000001,
root 0xc3, subw 0x0, time 11475701, (392,225), root:(393,308),
state 0x4, keycode 35 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
这是按下 Caps Lock 时 xev 当前显示的内容:
KeyPress event, serial 32, synthetic NO, window 0x3000001,
root 0xc3, subw 0x0, time 11549397, (493,363), root:(494,446),
state 0x0, keycode 66 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 2 bytes: (c2 a8) "¨"
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyRelease event, serial 32, synthetic NO, window 0x3000001,
root 0xc3, subw 0x0, time 11549493, (493,363), root:(494,446),
state 0x0, keycode 66 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 2 bytes: (c2 a8) "¨"
XFilterEvent returns: False
答案1
我基本解决了这个问题。我不能写带有分音符的字符,比如 ë 或 ü,但我反正不这么做。我的理论是我不能同时使用 AltGr 和 Caps Lock。但我不知道。
无论如何,这是我的 .Xmodmap 文件:
! Remap Ctrl to the ^ key
clear control
keycode 35 = Control_R
add control = Control_R Control_L
! Remap ~ (and ^ with a shift) to Caps Lock, AltGr don't seem to work :-/
clear Lock
keycode 66 = asciitilde dead_circumflex asciitilde asciitilde asciitilde dead_caron asciitilde