The top row of keys on the bluetooth keyboard Arteck HB030 by default works as multimedia keys to get Escape, F1-F10 you need to press the Fn key and one of these keys. To me, as a fan of Vim, it’s not very convenient.
Further we go almost on the same way as earlier. Create a directory for the configuration files:
mkdir -p ~/.config/xkb
Write the configuration of the current keyboard layout to the file hb030
:
setxkbmap -layout us,ru -option grp:toggle -option grp_led:caps -print > ~/.config/xkb/hb030
We get a file like this:
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledcaps(group_lock)" };
xkb_symbols { include "pc+us+inet(pc105)+ru:2+group(toggle)" };
xkb_geometry { include "pc(pc105)" };
};
Add the line key <I180> {[Escape, Escape]};
. <I180>
is the description of the upper left key on the Arteck HB030 keyboard. I saw it in the output of the command xev
and the file /usr/share/X11/xkb/keycodes/evdev
.
Separately I will say about key <AC10> {[colon, semicolon]};
- it allows to receive :
without pressing Shift
. I do not know yet whether it will be more convenient, because except in Vim, a colon is often needed in the protocols (ftp://, https://, etc.) and machine names (scp fc720:aabb.txt ./). We will see. Here is the resulting file:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledcaps(group_lock)" };
xkb_symbols { include "pc+us+ru:2+inet(evdev)+group(toggle)"
key <AC10> { [ colon, semicolon ] };
key <I180> { [ Escape, Escape ] };
};
xkb_geometry { include "pc(pc105)" };
};
You can activate the new layout using the command xkbcomp ${HOME}/.config/xkb/hb030 ${DISPLAY}
. It can be written in .xinitrc
or .xsession
.