--Describes how to use the Caps Lock key as the Ctrl key with the xmodmap command. -= Replace the Caps Lock key with the Ctrl key. --Cinnamon or GNOME3 can be realized with standard functions, but it seems that Xfce cannot. ――Please let me know if you know. --Operation check environment - Fedora 31 64bit
TL/DR; --Install Xodmap. --It should be old software, so it should be most X Window environment. --Test by writing key bindings in ~ / .Xmodmap. --Set to write in .bashrc and read automatically at login.
sudo dnf install xmodmap
--With yum up to CentOS7. (Which of fedora is fine, but when yum can't be used ...)
sudo yum install xmodmap
cat << '_EOT_' >> ~/.Xmodmap
clear lock
keycode 66 = Control_L
add control = Control_L Control_R
_EOT_
--On my laptop, Capslock's keycode was 66.
--Check around xev.
- dnf install xev
--Tap xev
to find out the keycode.
--After hitting xev on the terminal, if you press the corresponding key while the xev screen is active, you can check the key code as shown below.
--As shown in the capture below, the keycode for Capslock is 66.
xmodmap ~/.Xmodmap
echo $?
cat << '_EOT_' >> ~/.bashrc
xmodmap ~/.Xmodmap
_EOT_
source ~/.bashrc
echo $?
--Since the Alt key does not respond on my laptop, the conversion key
, non-conversion key
, and katakana / hiragana key
are all operated as Alt keys as shown below.
cat ~/.Xmodmap
clear lock
clear mod1
keycode 100 = Alt_R
keycode 101 = Alt_R
keycode 102 = Alt_R
keycode 66 = Control_L
add mod1 = Alt_R
add control = Control_L Control_R
――At first, I used to use Windows-like cinnnamon, but over time the machine specs couldn't keep up. --LXDE is also comfortable, but there is a bug that forces the US keyboard to be recognized. --Xfce comfortable. ――I feel that some of the shortcuts are unique ...
https://wiki.archlinux.jp/index.php/Xmodmap
Recommended Posts