Reputation: 105
I installed Alpine Linux on my daily driver laptop with dwm, dmenu, st and XOrg as instructed here. Initially, I set my keyboard mapping as "gb gb" in the 'alpine-setup' command, and this worked fine (all the keys were in the right place) while still in the tty. When I installed Xorg and the suckless tools this did not hold true; the keymapping was set to the default US keyboard layout. When I exit X and return to the tty the layout is fine, which shows the problem is on the side of Xorg or DWM. I've tried adding the following to my .xinitrc, to no improvement:
setxkbmap -layout gb
How would I change the keymapping of Xorg and suckless tools to the UK keyboard layout?
Upvotes: 1
Views: 3761
Reputation: 3285
You need to install setxkbmap
as it is not installed by default, and you should run this command from the terminal first to test it does work as intended before you add it to the `.xinitrc file.
Instructions are on the wiki.
# apk add setxkbmap
Then try
$ setxkbmap gb
In order to make it persistent add this section to /etc/X11/xorg.conf:
Section "InputClass"
Identifier "Keyboard Default"
MatchIsKeyboard "yes"
Option "XkbLayout" "gb"
EndSection
Another way to change the keymap when logging into X is to use ~/.xinitrc
, adding:
setxkbmap gb &
Upvotes: 1