You are not logged in.

#1 2019-06-21 11:50:57

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Problem with switching layouts using Setxkbmap in the Pantheon

Hi guys!

I used the following command to switch layouts for several years:

setxkbmap -option "grp:switch,grp:shift_caps_switch,grp_led:scroll" -layout "us,ru"

But this does not work for the pantheon. I can switch directly:

setxkbmap ru

and it works for pantheon. Also, I can't use shift and caps for a shortcut. Now I have to use the standard switching method, but it has a stutter.

I was unable to configure switching using configuration files X and localectl. Do you have any ideas?

Last edited by Use**ame (2019-06-21 22:56:50)

Offline

#2 2019-06-21 11:55:04

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: Problem with switching layouts using Setxkbmap in the Pantheon

I do have an idea but first you gotta tell me what does the 1st command do.
I have modified my own xkb keys and it's possible that my method could work for you. But before I tell you what I did, I need to be know what the command does. I just wanna be sure my modification will be relevant to your case and I won't be offtopic.


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#3 2019-06-21 12:09:02

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Re: Problem with switching layouts using Setxkbmap in the Pantheon

rado84, The first command turns on en switching via caps, and ru for shift + caps and turns on caps highlighting (not critical).

Offline

#4 2019-06-21 12:39:39

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: Problem with switching layouts using Setxkbmap in the Pantheon

Reading the comments on the stutter problem it seems this is a DE issue and my first idea won't help you in any way.

Since Pantheon is similar to Gnome and is written with GTK3, there is something you can try but you better make a full backup before that bc I'm not sure whether it will work at all and whether it won't create even more problems.

This comment

Everytime elementary deals with keyboard layout, it justs calls org.gnome.desktop.input-sources

gave me the idea to try with another settings manager. I've done such a thing with KDE quite recently because I didn't like the default settings manager. KDE simply downloaded all the dependencies for the new settings manager and I was able to set things the way I wanted. Eventually I went back to Cinnamon but that's another topic of discussion. smile In your case you will be simply touching the xkb settings but I'm hoping it will work. The only problem is that IDK how to make the below package to be default, meaning that your OS would call

cinnamon-settings-daemon

instead of

org.gnome.desktop.input-sources

If you know how to set it as default, try using it with the traditional layout switches and see if you'll have the same stutter.


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#5 2019-06-21 13:30:58

seth
Member
Registered: 2012-09-03
Posts: 50,011

Re: Problem with switching layouts using Setxkbmap in the Pantheon

Does

setxkbmap -option "grp:caps_toggle,grp_led:scroll" -layout "us,ru"

still work?
Does the switch syntax work outside pantheon? (if so, you should mention patheon in the subject)

The stutter from the complete change is *somewhat* normal.

Online

#6 2019-06-21 22:18:31

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Re: Problem with switching layouts using Setxkbmap in the Pantheon

rado84, I used gnome-tweaks. Changing the layout occurs with stuttering for different combinations.

Offline

#7 2019-06-21 22:22:48

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Re: Problem with switching layouts using Setxkbmap in the Pantheon

seth, It works without problems for XFCE and openbox. Pantheon mentioned in the initial message.

Offline

#8 2019-06-21 22:30:35

seth
Member
Registered: 2012-09-03
Posts: 50,011

Re: Problem with switching layouts using Setxkbmap in the Pantheon

If you edit your initial post, you can alter the subject of the thread to gain more attraction of other pantheon users.
Sanity check:

echo $XDG_SESSION_TYPE

is "x11"?

Online

#9 2019-06-21 22:56:24

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Re: Problem with switching layouts using Setxkbmap in the Pantheon

seth, Ok, I'll change the name of the topic. Let's see what comes out of it. Yes, x11 is now used.

Offline

#10 2019-08-03 05:06:32

Use**ame
Member
Registered: 2019-04-24
Posts: 48

Re: Problem with switching layouts using Setxkbmap in the Pantheon

Here is the solution to my problem. Now the layout is switched with the desired combination and without delay.

Offline

Board footer

Powered by FluxBB