You are not logged in.

#1 2021-01-22 09:12:24

tuman366
Member
Registered: 2021-01-18
Posts: 7

Multiple primary and multiple second keyboard layouts - how?

I have the english and russian layouts and circle between them by alt+shift. I need also a couple of others, but I want them to be secondary ones because I'll use more rare. That is, english and russian by alt+shift should remain, but, say french and spanish should be activated and circled between by other hot key combination.

Possible? And if yes, how?

Offline

#2 2021-01-22 13:50:14

seth
Member
Registered: 2012-09-03
Posts: 18,782

Re: Multiple primary and multiple second keyboard layouts - how?

I don't think that you can have things like layout "supergroups", but you could script setxkbmap to configure layout groups and bind that script to a shortcut or icon or dmenu it.

# demo, probably not a functional script
if [ setxkbmap -query | awk '/layout/{print $2}' = en ]; then
    setxkbmap -layout fr,es
else
    setxkbmap -layout en,ru
fi

nb. that setxkbmap may/will impact other states as the autorepitition etc. and you'll likely lose some shortcuts when switching layouts this way…

Alternatively you could "xdotool key ISO_Next_Group" until the desired layout is reached and select the active layout by other shortcuts (alt+shift+1,2,3,4 - don't forget to uset the group toggle, otherwise you can probbly not use alt+shift in a shortcut)
You might also be able to use this measure and different shortcuts to effectively select a supergroup and then toggle groups by cycling the layouts until the next in that supergroup is reached.

Online

#3 2021-01-22 14:09:19

positronik
Member
Registered: 2016-02-08
Posts: 81

Re: Multiple primary and multiple second keyboard layouts - how?

In case it might be easier to memorize the unicode codes of the letter that you need from ES and FR and just input them.
That's what I do when I need ü smile

Offline

#4 2021-01-22 14:11:44

seth
Member
Registered: 2012-09-03
Posts: 18,782

Re: Multiple primary and multiple second keyboard layouts - how?

Online

Board footer

Powered by FluxBB