How can I have the right ctrl key behave as the left ctrl key?
I would like to have the left and right ctrl keys to behave the same.
I already have the left key working as it should, in all the shortcuts, etc., but the right one seems to be completely ineffective.
I have looked in the keyboard layout options, but with no results.
I am on Linux Mint 20.2, with Mate desktop environment.
–addendum–
The result of xev
is as follows:
KeyPress event, serial 35, synthetic NO, window 0x5200001,
root 0x7ac, subw 0x5200002, time 416256, (49,43), root:(2600,505),
state 0x10, keycode 105 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyRelease event, serial 38, synthetic NO, window 0x5200001,
root 0x7ac, subw 0x5200002, time 416464, (49,43), root:(2600,505),
state 0x10, keycode 105 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
The output of xmodmap
is as follows:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
xmodmap -e "keycode 105 = Control_L NoSymbol Control_L"
As you confirm in comments, the following two xmodmap
commands do the trick:
xmodmap -e "keycode 105 = Control_R NoSymbol Control_R"
xmodmap -e "add control = Control_R"
It will not stay after reboot, so you need to save only the text in quotes in ~/.Xmodmap file and make it executed at startup.
I have found a more stable and final solution!
The behavior I want (both ctrl keys, left and right, having the same behavior) is indeed the default.
My problem was that a keyboard setting was changing this default.
I just found this setting, I have de-selected it, and the default (wanted) behavior is obtained!
The setting is reached as follows:
Keyboard preferences -> Layouts -> Options -> Position of Compose key -> Right Ctrl.
Below I report the screenshots: