Swap the left Ctrl and left Alt keys while replacing the Caps key with the Ctrl key (Linux, Ubuntu)

CTRL key settings I want

point

Tried environment

procedure

1. Replace / replace Ctrl key with setxkbmap

"Replace Caps key with Ctrl key" and "Swap left Alt key and left Ctrl key" have the following options predefined, so you can use them.

Specify the above option when executing "set xkbmap"

$ setxkbmap -option "ctrl:nocaps" -option "ctrl:swap_lalt_lctl"

Check with set xkbmap -print to see if the settings have been made (xkb_symbols)

$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	★xkb_ctrl specified in symbols(nocaps)And ctrl(swap_lalt_lctl)Can be confirmed that has been added
	xkb_symbols   { include "pc+us+us:2+inet(evdev)+ctrl(nocaps)+ctrl(swap_lalt_lctl)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

2. Enable this setting every time you start X

For Ubuntu

Launch "gnome-session-properties" and press "Add" to add "set xkbmap -option" ctrl: nocaps "-option" ctrl: swap_lalt_lctl ""

In other cases

In recent Raspbian, ~ / .config / lxsession / LXDE-pi / autostart which was based on LXDE cannot be used, so write it in a shell script, register it as a service in systemd, and execute it.

Note

Recommended Posts

Swap the left Ctrl and left Alt keys while replacing the Caps key with the Ctrl key (Linux, Ubuntu)
[linux] Swap Caps Lock and Ctrl
The story of replacing Nvidia GTX 1650 with Linux Mint 20.1.
Install Ubuntu 20.04 with GUI and prepare the development environment