LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2022, 09:00 AM   #1
lucazz
LQ Newbie
 
Registered: Jun 2022
Location: Brazil
Distribution: Slackware 15.0
Posts: 6

Rep: Reputation: 1
Angry Set Keyboard Layout on Slackware 15.0


Hey people I'm quite new using slackware and everything is working pretty well so far except my keyboard.

I cant perform actions like put an accent on a letter: ã é è
When I try, what happens is: ~a 'e

The only way that's working right now is using the following command every time I start my computer:

setxkbmap br

But I want to find a way to not have to type this command every time, do this automatically or just configure my keyboard to be loaded in the right way.

What I've tried:

#1 - Modify rc.local (including the "setxkbmap br" command)
#2 - Usage of Crontab (@reload sh /home/user/setxkbmap.sh)
#3 - Copy the file /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf inside the folder /etc/X11/xorg.conf.d/ and modifying it to br.
#4 - Rename the file 90-keyboard-layout-evdev.conf to 90-keyboard-layout.conf inside the folder /etc/X11/xorg.conf.d/
 
Old 06-15-2022, 10:15 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
This may be helpful: https://docs.slackware.com/howtos:wi...eyboard_layout
 
Old 06-16-2022, 09:41 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,920

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
rc.local and crontab are definately not the correct place for a setxkbmap command, but you're on the right track with #3 and #4.

I prefer this:
Code:
# /etc/X11/xorg.conf.d/90-keyboard.conf ################################

Section "InputClass"
        Identifier "keyboard-gb"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        #Driver "libinput"
        Driver "evdev"
        Option "XkbLayout" "gb"
        Option "XkbVariant" ""
        Option "XkbOptions" "terminate:ctrl_alt_bksp,lv3:ralt_switch_multikey"
EndSection

########################################################################
The lv3:ralt_switch_multikey option will make shift-ralt start a "compose sequence", so to get a ẽ I hold shift, hit and release ralt, release shift, then type '~', then 'e'

This works for me with the British keyboard layout (gb), can't speak for the 'br' layout, but give it a go.

You can map the compose key onto other keys instead by using other options, but I find this setting works best for me.

Last edited by GazL; 06-16-2022 at 09:43 AM.
 
1 members found this post helpful.
Old 06-16-2022, 10:54 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
With the Brazilian keyboard you don't need the compose key (unless you want to type things like ≠); all the necessary accents are on dead keys. That why the OP wants br.
 
1 members found this post helpful.
Old 06-16-2022, 11:14 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,920

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Fair enough.

I've tried the dead-keys variant of the gb layout in the past: didn't really get on with it myself.
 
Old 06-16-2022, 11:27 AM   #6
lucazz
LQ Newbie
 
Registered: Jun 2022
Location: Brazil
Distribution: Slackware 15.0
Posts: 6

Original Poster
Rep: Reputation: 1
This is a good idea but I dont think it would work because I use Shift to perform other accents like ^

So if I want to type "â" I have to: hold shilf+ ~ + a

Quote:
Originally Posted by GazL View Post
rc.local and crontab are definately not the correct place for a setxkbmap command, but you're on the right track with #3 and #4.

I prefer this:
Code:
# /etc/X11/xorg.conf.d/90-keyboard.conf ################################

Section "InputClass"
        Identifier "keyboard-gb"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        #Driver "libinput"
        Driver "evdev"
        Option "XkbLayout" "gb"
        Option "XkbVariant" ""
        Option "XkbOptions" "terminate:ctrl_alt_bksp,lv3:ralt_switch_multikey"
EndSection

########################################################################
The lv3:ralt_switch_multikey option will make shift-ralt start a "compose sequence", so to get a ẽ I hold shift, hit and release ralt, release shift, then type '~', then 'e'

This works for me with the British keyboard layout (gb), can't speak for the 'br' layout, but give it a go.

You can map the compose key onto other keys instead by using other options, but I find this setting works best for me.
 
Old 06-16-2022, 11:30 AM   #7
lucazz
LQ Newbie
 
Registered: Jun 2022
Location: Brazil
Distribution: Slackware 15.0
Posts: 6

Original Poster
Rep: Reputation: 1
:/

In my xfce keyboard layout setting I setted up the Brazilian(no dead keys), so I can type all the characters, but I cant perform letters with accents like "ã" when I press "~" it doesnt wait for me to type the letter, it just print the character instead

Quote:
Originally Posted by DavidMcCann View Post
With the Brazilian keyboard you don't need the compose key (unless you want to type things like ≠); all the necessary accents are on dead keys. That why the OP wants br.
 
Old 06-16-2022, 12:03 PM   #8
lucazz
LQ Newbie
 
Registered: Jun 2022
Location: Brazil
Distribution: Slackware 15.0
Posts: 6

Original Poster
Rep: Reputation: 1
Talking Guys I found a solution

It was a lot more easy them I expected, I was simply selecting the wrong keyboard layout in the XFCE keyboard layout settings. I attached a screenshot with the solution.

Thank yall for the ideas <3
Attached Thumbnails
Click image for larger version

Name:	realscreenshot.png
Views:	59
Size:	114.7 KB
ID:	39077  
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting the correct keyboard layout corresponding to my laptop's physical layout nidra Linux - Newbie 2 08-28-2017 08:14 AM
[SOLVED] Layout initially different between USB keyboard and laptop's integrated keyboard BrutalMusic Linux - Laptop and Netbook 6 02-07-2014 04:06 AM
Keyboard layout plugin disappears after keyboard is plugged in XFCE4 fsb Linux - Laptop and Netbook 0 01-04-2013 05:45 PM
Switching keyboard layout - Mandriva2006 - K.D.E. Windows Layout! itz2000 Mandriva 3 08-13-2006 06:43 PM
KDE Keyboard Shortcuts with different Keyboard Layout hellblade Linux - Software 5 04-18-2006 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration