我正在尝试重新映射我right alt的行为,right ctrl以便我可以用右手拇指按下ctrl按钮。这是 Ubuntu 12.04。
我在我的主文件夹中创建了文件 .Xmodmap ,内容如下:
clear control
clear mod1
!keycode 64 = Alt_L Meta_L
keycode 108 = Alt_R Meta_R
add control = Control_L Control_R Alt_R
add mod1 = Alt_L Meta_L
Run Code Online (Sandbox Code Playgroud)
你可能猜到了,我的左 alt 键的键码是 64,我的left alt键的键码是 108。
这实际上是有效的,因为我的右 alt 键的行为就像我按下ctrl键一样。
但是我的左键alt现在不再做任何事情,这意味着我没有alt剩下的键了。鉴于xmodmap给出以下输出,这很奇怪:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), …Run Code Online (Sandbox Code Playgroud) xmodmap ×1