The Gnome 3 Linux desktop environment is very unique. Modern versions of this DE have nothing common with the traditional desktop paradigm. Today, we will see how to assign a single key shortcut (not some key combination like Win + Space or Alt + Shift) to change your keyboard layout in Gnome 3.
The Gnome 3 Linux desktop environment is not something that is extremely popular today. At one time, Gnome used to be one of the most popular desktop environments. But it has diverged so much from Gnome 2 that it looks different, and it works differently.
Starting in Ubuntu 18.04, Gnome 3 is the new default desktop environment of the OS, replacing Unity. This may increase the user base of the DE and make it more popular among Linux users.
Tip: There is a list of interesting and useful features available in Gnome 3. You can find it here:
Out of the box, Gnome 3 has the following hotkeys for changing your keyboard layout: Win + Space and Shift + Win + Space. The appropriate option can be found in Settings - Devices Keyboard.
There, you can change the key sequence to anything that suits your preferences. However, the configuration dialog doesn't allow the user to set a single key and requires entering a sequence.
Personally, I prefer to switch the installed keyboard layouts with a single key. I use the right Control key for this and find it very useful. So, let's see how this can be configured in Gnome 3.
To set a single key shortcut to change keyboard layout in Gnome 3, do the following.
- Install the dconf-editor app. Depending on your distro, it may not be installed out of the box. hasn't been installed. See the article Enable Flags for MATE Keyboard Layout Indicator to learn how to install it.
- Launch dconf-editor. It can be found in activities.
- In dconf-editor, go to org > gnome > desktop > input-sources. See the screenshot.
- You'll see the xkb-options line. This is exactly what we need. Set this value to the desired format: ['value1','value2']. The parameter is a string array to store classic xkb options. In my case (right CTRL to switch between keyboard layouts), I will specify the following value: ['grp:rctrl_toggle'].
That's all. Other values for quick reference:
- grp:ctrl_shift_toggle - Use the Ctrl+Shift key sequence.
- grp:caps_toggle - Use the Caps Lock key.
- grp:win_switch - Both Win-keys switch group while pressed
- grp:toggle - Right Alt key changes group
- grp:lalt_toggle - Left Alt key changes group
- grp:caps_toggle - Caps Lock key changes group
- grp:shift_caps_toggle - Shift+CapsLock changes group
- grp:shift_toggle - Both Shift keys together change group
- grp:alts_toggle - Both Alt keys together change group
- grp:ctrls_toggle - Both Ctrl keys together change group
- grp:ctrl_shift_toggle - Control+Shift changes group
- grp:ctrl_alt_toggle - Alt+Control changes group
- grp:alt_shift_toggle - Alt+Shift changes group
- grp:menu_toggle - toggle using "context menu" key on Windows keyboards
- grp:lwin_toggle - toggle using left win key on Windows keyboards
- grp:rwin_toggle - toggle using right win key on Windows keyboards
- grp:lshift_toggle - Left Shift key changes group
- grp:rshift_toggle - Right Shift key changes group
- grp:lctrl_toggle - Left Ctrl key changes group
- grp:rctrl_toggle - Right Ctrl key changes group
- grp_led - use keyboard leds to indicate group change
- grp_led:num - Num_Lock led indicates group change
- grp_led:caps - Caps_Lock led indicates group change
- grp_led:scroll - Scroll_Lock led indicates group change
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!