0

I use 4 languages and I'm looking for a convenient way to switch the keyboard layout (input source). There's a key to switch to the next layout, but it's hard to use - it requires remembering what the current layout is to calculate how many times you have to press the switch button layout (up to 3 times).

I was thinking about buying an additional programmable keyboard but noticed that there're a lot of unused buttons on my current keyboard - I don't use numpad at all.

Is it possible to define custom hotkeys for setting the specific layout in ubuntu 20.04? It should be like:

  • 1 (on the numpad only) - set keyboard layout to EN,
  • 2 (on the numpad only) - set keyboard layout to RU,
  • 3 (on the numpad only) - set keyboard layout to LT,
  • 4 (on the numpad only) - set keyboard layout to PL
Kasheftin
  • 353

1 Answers1

0

Found the solution here, How to configure shortcuts to switch to specific keyboard layout in ubuntu 14

Works like a charm.

setxkbmap us changes the keyboard layout to us. Then you have to assign 1 to this command using settings->keyboard shortcuts -> + Add new shortcut, 2 - setxkbmap ru, etc.

The only issue is that the language widget does not work properly with setxkbmap - it shows some value, that still can be changed using the default keys to switch the layout, but luckily it does not affect on the keyboard in any way after using setxkbmap. I was able to get rid of it using settings->region & language -> remove everything except an English input source.

Kasheftin
  • 353