Setting keyboard layout to abnt2

Hello friends,

I’m trying to set my keyboard layout definitively but I’m having trouble.
I use this command to set it the right way: “setxkbmap -model abnt2 -layout br -variant abnt2”, it works but every time I restart or suspend the computer the config gets wrong again. Already tried creating a .desktop file and execute de scrip on autostart and it works nice but only for reboots, if returning from suspend the problem persists.

Thanks in advance!

Because I don’t now which locale is associated with abnt2 - my suggestion will be generic.

The following files controls various aspects of the system with relation to keyboard layout - maybe you can adjust those to fit your purpose.

  • /etc/vconsole.conf
  • /etc/X11/xorg.conf.d/00-keyboard.conf
1 Like

That should be, something like this:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "br"
        Option "XkbModel" "abnt2"
        Option "XkbVariant" ",abnt2"
EndSection
1 Like

Thank you both for the answers!

I tried editing the

/etc/X11/xorg.conf.d/00-keyboard.conf

with this

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "br"
        Option "XkbModel" "abnt2"
        Option "XkbVariant" ",abnt2"
EndSection

but it’s still not working, after rebooting when a try to acentuate any letter i get this " 'a " not this “á”.

was wondering if the comma (Option “XkbVariant” “,abnt2”) was intentional so tried both (with and without), not worked.

Have I made something wrong?

If in doubt, check the wiki Xorg/Keyboard configuration - ArchWiki

That only means your Gnome settings for the keyboard layout do not match, so check that too in the input sources

But, due to the Manjaro Settings Manager, you have to check if that also matches in Keyboard settings.

1 Like

Got it!
The layout was wrong, the problem was that the layout picture and the “real layout” are not matching, so when I look at the picture it seens like it’s not my keyboard altought in reality it is.
Thx for all the help, that thing about looking at the manjaro settings manager helped a lot.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.