I wanted to have two keyboard layouts (one for english and one for spanish), and add a shortcut for switching between them.
The solution I chose was to set the following lines in my /etc/default/keyboard
file:
XKBLAYOUT="us,es"
XKBOPTION="grp:ctrl_shift_toggle"
This has turned out to be a mistake because the ctrl_shift shortcut interfers and takes precedence over all other application level shortcuts like browser's ctrl+shift+tab and vi's ctrl+shift+insert.
I haven't found a way to revert this change and have it persist in between shutdowns.
Here are the methods I have tried:
1) Removing the XKBOPTION
line from /etc/default/keyboard
2) Running the command dpkg-reconfigure keyboard
3) Running the command setxkbmap -option
. This works but is reset upon restarting.
4) Configuring one single layout by adding the line XKBLAYOUT
and adding the alternative layout via GNOME and using the GNOME shortcut (Super space). The switch has no effect and is reset upon restarting.
I don't know where these changes are stored in between installs, I have ran grep with searching for terms like XKBOPTION,ctrl_shift_toggle but I can't seem to find it. All I can find is that the setxkbmap -print
command shows the ctrl_shift_toggle option:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+es:2+us:3+inet(evdev)+grp(ctrl_shift_toggle)" };
xkb_geometry { include "pc(pc105)" };
};
However, as mentioned, I cannot find the file responsible for the ctrl_shift_toggle configuration.
Note: The question is looking for an answer that can revert the state of the keyboard setting either to the original setting, or to the desired configuration. Reinstalling the OS or a solution that starts from a clean install is not considered an optimal solution. The reason for this is that, as a superuser, I want to have deep control of my system.
Thank you for your time.