I've been trying to configure my laptop, so that the builtin keyboard is in portuguese and my usb keyboard is in english (international). I have been doing some research and got to a solution that works perfectly well when the usb keyboard is plugged in after the xorg server is started. In this situation both keyboards have their respective layouts. But if I start the xorg server with the usb keyboard plugged in, both keyboards end up with the english layout.
Right now my /etc/X11/xorg.conf.d/30-keyboard.conf
is the following:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
MatchProduct "AT Translated Set 2 keyboard"
Driver "evdev"
Option "XkbModel" "abnt2"
Option "XkbLayout" "br"
EndSection
Section "InputClass"
Identifier "usb-keyboard"
MatchIsKeyboard "on"
MatchProduct "Evision RGB Keyboard"
Driver "evdev"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
Option "XkbVariant" "altgr-intl"
EndSection
I really don't understand why it works well when I start the xorg server and then plug in the usb keyboard, but it doesn't work when I start the xorg server with the usb keyboard already plugged in.
I have tried breaking the config in 2 separate files 30-system-keyboard.conf
and 40-usb-keyboard.conf
so that one config is loaded afther the other one, but the result is the same.
Can someone please help me fix this, so that it works in all situations?
Setting the layouts via setxkbmap -device ID
doesn't work because the IDs change.
de
), but only the laptop's internal keyboard should have another layout (us
). I have created first a configuration that matches all keyboards and sets layoutde
, and later a configuration that matches theAT Translated Set 2 keyboard
and sets layoutus
.