我原先发于 CSDN
1.
Change keyboard layout as colemak, and <Esc>
with
<CapsLock>
For Windows check here
1.1. TLDR
# tty
# /etc/vconsole.conf
KEYMAP = colemak
# or
loadkeys colemak
# graphic
setxkbmap us -variant colemak
1.2. change to colemak
1.2.1. Temporary
# tty
loadkeys colemak
# graphic
setxkbmap us -variant colemak
1.2.2. Permanet
# tty (include graphic)
# /etc/vconsole.conf
KEYMAP = colemak
The above way may not work for Ubuntu, so adding
setxkbmap us -variant colemak
in ~/.xinitrc
may worked. If not see the next section.
1.3. Map Esc
with
CapsLock
setxkbmap us -variant colemak
xmodmap -pke > .xmodmap
A small tip: show the key code by xev
Then exchange the key codes of <esc>
and
<capslock>
in .xmodmap
file.
1.3.1. Temporary
xmodmap ./.xmodmap
1.3.2. Permanet
1.3.2.1. i3-wm
In ~/.config/i3/config
exec_always sleep 1; xmodmap ~/.xmodmap
1.3.2.2. Others include i3-wm
# /usr/share/X11/xkb/keycodes/evdev
# exchange the keycodes of <esc> and <capslock>
For ubuntu, you could try the following, I forget exactly
sudo dpkg-reconfigure keyboard-configuration