Skip to content

Instantly share code, notes, and snippets.

@VladimirCores
Last active September 23, 2022 08:35
Show Gist options
  • Save VladimirCores/6ef54a0cb59184debbeaff1a8de10000 to your computer and use it in GitHub Desktop.
Save VladimirCores/6ef54a0cb59184debbeaff1a8de10000 to your computer and use it in GitHub Desktop.
Keyboard switch
What worked for me was setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru
You need to create a file /etc/X11/xorg.conf.d/00-keyboard.conf for this you can use this command:
localectl --no-convert set-x11-keymap us,ru grp:switch,grp:alt_shift_toggle,grp_led:scroll
If you wanted to enable the Ctrl+Alt+Backspace sequence to kill the X server by default
setxkbmap -option "terminate:ctrl_alt_bksp"
localectl --no-convert set-x11-keymap us,ru grp:switch,grp:alt_shift_toggle,grp_led:scroll,terminate:ctrl_alt_bksp
https://github.com/linuxdeepin/developer-center/issues/2749#issuecomment-865896836
@VladimirCores
Copy link
Author

xmodmap ~/.Xmodmap

@VladimirCores
Copy link
Author

@VladimirCores
Copy link
Author

VladimirCores commented Sep 21, 2022

Run this gedit ~/.config/autostart/switch-alt-ctrl.desktop and add this in the file through a text editor:

Code:
[Desktop Entry]
Type=Application
Exec=sh -c "setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru; xmodmap ~/.Xmodmap"
Name=Switch Alt and Ctrls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment