Peppermint OS Community Forum

Support => Software & Applications => Topic started by: damig on April 25, 2014, 08:01:12 am

Title: keyboard shortcut for switching between Keyboard Layouts not working (SOLVED)
Post by: damig on April 25, 2014, 08:01:12 am
I have Installed a second keyboard layout and can't switch between them using keyboard shortcut. I've noticed when I tick `keys to change layout and LShift+LAlt`(in `Preferences>Keyboard Layout>Tools>hide/unhide profiles>global>options), it unticks either `keys to change layout` or the`LShift+LAlt` after `apply`. It worked for a moment, but now it doesn't. Can anyone help?
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: mac on April 25, 2014, 11:19:48 am
To the left of "Key(s) to change layout" click on the dark triangle to see your options (see image in Spoiler)
Spoiler (click here to view / hide)
(https://dl.dropboxusercontent.com/u/9267308/keys.png)
[close]
Is that what you're after?  ???
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: PCNetSpec on April 25, 2014, 12:42:25 pm
Which layouts ?

Let's say you wanted to use LeftAlt+LeftShift to toggle between the GB and Russian keyboard layouts

you could run:
Code: [Select]
setxkbmap -option grp:lalt_lshift_toggle "gb,ru"
and test it works.

If it works, add the line

@setxkbmap -option grp:lalt_lshift_toggle "gb,ru"

to

/etc/xdg/lxsession/Peppermint/autostart



See here:
https://help.ubuntu.com/community/Lubuntu/Keyboard#Keyboard_Mapping

but remember the location of the Peppermint autostart file is as above .. not the location on that page.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: damig on April 25, 2014, 06:14:06 pm
thx guys, it looks like a homework. I'll keep in touch...
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: damig on April 25, 2014, 06:29:12 pm
To the left of "Key(s) to change layout" click on the dark triangle to see your options (see image in Spoiler)
Spoiler (click here to view / hide)
(https://dl.dropboxusercontent.com/u/9267308/keys.png)
[close]
Is that what you're after?  ???
mac, yes. I tick the 'key(s) to change layout` as well as the option for the key shortcut (dropdown menu is activated with the black arrow in front of the tick field). In my case, I tick the Left Shift+Left Alt (Windows habit) as well. So now I tell system to change keyboard layouts when I press the LShift+LAlt. But when I click `apply` either `key(s to change layout` or the `Left Shift+Left Alt` tick field is unticked.
I have en and mk as keyboard layouts and I didn't installed it as I said, but the Peppermint OS Live CD Installation did that automatically with me just inputing location.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: mac on April 25, 2014, 07:30:31 pm
Did you try PCNetSpec's instructions above?
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: PCNetSpec on April 25, 2014, 08:06:52 pm
I'm not even sure where you guys are trying to change the settings.

Either follow my instructions above, or just add the Keyboard Layout Handler panel applet, and set it to do the same.

Even if you use my original instructions, you'll probably still want to add the Keyboard Layout Handler panel applet, so you have an indicator of which layout you're currently using.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: damig on April 26, 2014, 06:11:43 am
Did you try PCNetSpec's instructions above?
trying to keep up with you guys but have mercy, what is silly for you, it's a burden for me...
re: the
Code: [Select]
setxkbmap -option grp:lalt_lshift_toggle "gb,mk"
... it works, now I have to continue
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: PCNetSpec on April 26, 2014, 06:24:08 am
OK, if that works, open a terminal and run:
Code: [Select]
sudo gedit /etc/xdg/lxsession/Peppermint/autostart
when a text document with a few lines already in it opens, add a single NEW line at the bottom that reads:-
Code: [Select]
@setxkbmap -option grp:lalt_lshift_toggle "gb,mk"
SAVE the file, and exit gedit.

Now reboot to test it still works after the reboot without you having to run anything in a terminal.

[EDIT]

Once that's working, let us know if you'd like to add the Keyboard Layout Handler panel applet .. that will give you a little flag by your clock telling you which layout is currently active.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: damig on April 26, 2014, 06:39:33 am
I'm not even sure where you guys are trying to change the settings.

Either follow my instructions above, or just add the Keyboard Layout Handler panel applet, and set it to do the same.

Even if you use my original instructions, you'll probably still want to add the Keyboard Layout Handler panel applet, so you have an indicator of which layout you're currently using.
already done that PCNetSpec,
here what was going on guys:
at the beginning, the first thing I did regarding typing and surfing is to add Macedonian keyboard layout in the OS. I found it under preferences>keyboard layout and altho not user friendly, it showed the default en and mk installed. Ok, I snooped around to assign shortcut keys to change the keybord layout and I found the place ticked them both and confidently went back to surfing. But when I would use the shortcut, no change. Then I looked for, found and installed the handler which shows the current keybord layout. It worked! I was switching the flags with the shortcut, and typing latin and cyrillic. But it was for a brief moment. Everything went back to not responding when using the shortcut. My investigation resulted with realising that the system somehow untics the assignment of the shortcut when `apply` is pressed.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: PCNetSpec on April 26, 2014, 06:48:39 am
See my last posting.
Title: Re: Switching 2 Keyboard Layouts shorcut option unticks itself
Post by: damig on April 26, 2014, 07:18:22 am
асдфјасдasd;fjasl;dgjl
it worked! thx guys