LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Multiple keyboards layout with only 2 layouts on Shift alt ? (https://www.linuxquestions.org/questions/linux-desktop-74/multiple-keyboards-layout-with-only-2-layouts-on-shift-alt-4175681108/)

oren_daniel 08-27-2020 07:00 AM

Multiple keyboards layout with only 2 layouts on Shift alt ?
 
I usually write in both English and Hebrew, however from time to time I need to type Greek letters or letters from other language (but not very often).

So the the setup I want is Shift - Alt swaps from English to Hebrew only, but When I press the keyboard applet I can choose which layout the I want from a list.

I am using Ubuntu Mate Raspberry build.

Can I achieve such setup?

DavidMcCann 08-27-2020 11:08 AM

The keyboard short-cut is a toggle. Pressing it once takes you to Hebrew, pressing it again should take you to Greek. If it doesn't, then you have a bug and will just have to use the panel applet.

oren_daniel 08-27-2020 11:36 AM

Quote:

Originally Posted by DavidMcCann (Post 6160098)
The keyboard short-cut is a toggle. Pressing it once takes you to Hebrew, pressing it again should take you to Greek. If it doesn't, then you have a bug and will just have to use the panel applet.

Thank you for your response David.

Now I think you misunderstood my question, My Layouts look something like this:

English
Hebrew
Greek
Phoenician Keyboard


I want "Shift Alt" to cycle between English and Hebrew only because I use those very often (That is Greek and Phoenician should be ignored).

However from time to time I type in Greek or Phoenician, but not very often so I don't want "Shift Alt" to switch to them, However I need way to select them (by pressing the applet or any other way).

Is there a way to achieve such a behavior?

lvm_ 08-28-2020 08:00 AM

There are ways to switch between just two of the installed layouts e.g.

grp:lctrl_rctrl_switch Left Ctrl to first layout; Right Ctrl to last layout

but all such combinations use different hotkeys for each of the two layouts, not one to toggle. Full list is in man xkeyboard-config and should be available in the GUI keyboard setup utility you are using.

DavidMcCann 08-28-2020 11:22 AM

In the GUIs with which I'm familiar, setting the group switch is global and the same for all keyboard drivers. Using different moves for different drivers would require editing the drivers in /usr/share/X11/xkb/symbols. The basic options available are to move to the next group, move to the previous group, and move to the last group — no way move directly to the third of four. I have in my basic code (/usr/share/X11/xkb/symbols/pc)
Code:

key <SCLK> {[ISO_Next_Group, ISO_Prev_Group]};
so for me Scroll Lock gets the second keyboard, Shift + Scroll Lock goes back to the first, and Scroll Lock twice gets the third.

oren_daniel 08-28-2020 04:35 PM

In the end I settled for Alt+Shift | LCtrl+LWin first layout ; RCtrl+Menu second layout, and it quite easy to use.

Then I LCtrl+LWin to always return to English.


All times are GMT -5. The time now is 09:56 PM.