At present, Cosmic Desktop by System76 lacks a GUI to configure input source switching. However, the system uses the XKB (X Keyboard Extension) system, which allows manual configuration of input switching by modifying the relevant XKB settings.
The grp:win_space_toggle
option defines a key combination (Super+Space or Win+Space) for switching between input sources. The provided workaround manually sets this option by editing the xkb_config
file.
This approach gives users the flexibility to switch between keyboard layouts without waiting for native support in Cosmic Desktop.
- This workaround is temporary and may become obsolete if future updates to Cosmic Desktop include native support for input source switching.
- For users with different preferences, other XKB options can be configured similarly.
The XKB configuration file for Cosmic Desktop is located at:
~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
This file contains the keyboard layout settings used by Cosmic Desktop.
Open the XKB configuration file in your preferred text editor.
nano ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
By default, the options
key is set to None
, which means no custom keyboard options are configured. To enable switching between input sources using the Super+Space hotkey, modify the options
field as follows:
Before:
options: None,
After:
options: Some(",grp:win_space_toggle"),
This change maps the Super+Space (Win+Space) key combination to toggle between keyboard layouts.
After saving the changes to the configuration file, log out of your session and log back in for the changes to take effect.
To verify that the Super+Space hotkey is correctly set up, you can inspect the available XKB options by running the following command:
cat /usr/share/X11/xkb/rules/base.lst | grep space
This command will list the available spacebar-related options, and grp:win_space_toggle
should be included in the list.