xfce caps映射
How to remap the Caps Lock key to Control for Emacs? My left little finger is just so tired…
如何将Caps Lock键重新映射到Control for Emacs ? 我的左手小手指太累了...
You can either change it in gnome-tweak-tool on Gnome 3:
您可以在Gnome 3的gnome -tweak-tool中进行更改:
Or:
要么:
You can make use of 2 tools: xev to find out the key code for Caps Lock and xmodmap to modify key maps.
您可以使用2种工具: xev可以找到Caps Lock的键代码,而xmodmap可以修改键图。
First, run xev
in an console and print the Caps Lock. It will print some events, find a line like:
首先,在控制台中运行xev
并打印 Caps Lock。 它将打印一些事件,找到类似以下的行:
state 0x4, keycode 66 (keysym 0xffe3, ...
The keycode for the Caps Lock is 66.
Caps Lock的键代码为66。
Then, set the mapping of the Caps Lock with xmodmap
to map Caps Lock to left Control:
然后,使用xmodmap
设置Caps Lock的映射,以将Caps Lock映射到左侧的Control:
xmodmap -e "keycode 66 = Control_L"
Last, if you want to save the changes permanently, you may consider add the config into your ~/.xsession
file.
最后,如果要永久保存更改,可以考虑将配置添加到~/.xsession
文件中。
Or:
要么:
You can run xmodmap on this map:
您可以在此地图上运行xmodmap:
clear control
clear Lock
keycode 66 = Control_L
add control = Control_R Control_L
翻译自: https://www.systutorials.com/how-to-remap-the-caps-lock-key-to-control-for-emacs/
xfce caps映射