During the installation of Slackware we are asked to select a keyboard configuration that makes sense to us, however after installing the system and starting the X server (GUI) the default US layout will still be configured.
What we should do to solve this is to copy the configuration file /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf to /etc/X11/xorg.conf.d/xorg.conf
# cp /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf /etc/X11/xorg.conf.d/xorg.conf
Then we must edit the xorg.conf file with the text editor of your choice, don’t forget that you need to be the root user. Look for the lines that have Option “XkbLayout” “us” and change it to the acronym of the country you want, as I’m Brazilian, I want to use the Brazilian keyboard pattern so the line would look like this Option “XkbLayout” “br”.
The result should be something like this: