Multiple Keyboard Layouts

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
darkeale

Multiple Keyboard Layouts

Post by darkeale »

Hi,

I have just installed Linux Mint LXDE 10 on my old desktop, and I really like it so far. The only thing I am struggling to do is set it up to have multiple keyboard layouts. In Windows, and Ubuntu, I could set my main keyboard layout to British, then by pressing a combination (shift + ctrl) the layout will change to Finnish. Is there any way to do this in Mint LXDE 10? I need to be able to get the special characters i.e. ä and ö.

Thanks,
Alex
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mads

Re: Multiple Keyboard Layouts

Post by mads »

I don't know about LXDE, but in Gnome:
Menu > Preferences > Keyboard > Layouts
darkeale

Re: Multiple Keyboard Layouts

Post by darkeale »

mads wrote:I don't know about LXDE, but in Gnome:
Menu > Preferences > Keyboard > Layouts
In LXDE that allows me to change the layout, but I can only have one at a time, and have to access that menu to change it. What I am hoping to be able to do is to set it up so that a quick keyboard shortcut like shift+ctrl will change the layout.

Thanks,
Alex
SimonTS

Re: Multiple Keyboard Layouts

Post by SimonTS »

Funnily enough, you may just find your answer in this thread from a couple of days ago;-

http://forums.linuxmint.com/viewtopic.p ... 1&p=395049

It seems like you're not the only one trying to do this hey?
darkeale

Re: Multiple Keyboard Layouts

Post by darkeale »

I had an idea to make my own custom layout. So to add the characters ö and ä to my gb layout. However, when I go into the usr/share/X11/xkb/symbols folder and edit the gb file so that the key that is next to "p" (the [ and { key) is ä, then restart the computer, nothing happens. The output when I press the key is still the same as the default. Does anyone know how to edit this file so that the changes will be implimented on a reboot?

Thanks,
Alex
darkeale

Re: Multiple Keyboard Layouts

Post by darkeale »

change of approach. It appears that by typing:-

setxkbmap gb,fi -option "grp:alt_shift_toggle"

allows me to toggle between the gb and fi layouts using the alt+shift combination. However, after a restart this command has to be run again, even if I put it into the .linuxmint/skl file. Does anyone know how to add this command to the start up process so that it will automatically happen at each start up?

Thanks,
Alex
SimonTS

Re: Multiple Keyboard Layouts

Post by SimonTS »

Hi again Alex,

It sounds like you are doing much as was suggested in the thread I gave;--

1. Open as root, the following file:
Code: Select all
/etc/xdg/lxsession/LXDE/autostart
2. Add a line like this one (obviously change the locales at the appropriate ones :
Code: Select all
@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,gr

Have you tried modifying the autostart file?
darkeale

Re: Multiple Keyboard Layouts

Post by darkeale »

Finallt got it!

for anyone else with the same problem, run the following in a terminal:-

gksu leafpad /etc/xdg/lxsession/Mint/autostart

Then in that file add the following line at the end:-

@setxkbmap gb,fi -option "grp:alt_shift_toggle"

Save the file, and reboot.

This enables to gb and fi keyboard layouts to be toggled with the alt+shift combination. change the "gb,fi" bit to whatever layouts you want.

Alex
darkeale

Re: Multiple Keyboard Layouts

Post by darkeale »

SimonTS wrote:Hi again Alex,

It sounds like you are doing much as was suggested in the thread I gave;--

1. Open as root, the following file:
Code: Select all
/etc/xdg/lxsession/LXDE/autostart
2. Add a line like this one (obviously change the locales at the appropriate ones :
Code: Select all
@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,gr

Have you tried modifying the autostart file?

Thanks for you help, SimonTS. Just what I needed!

Alex
SimonTS

Re: Multiple Keyboard Layouts

Post by SimonTS »

Olet tervetullut

Can you please now edit your first posting and put the word [SOLVED] in the subject line.

Thanks
Locked

Return to “Beginner Questions”