I remap CapsLock to ctrl in linux using gnome-tweaks version 42.beta
Failure:
When I enable gnome-tweaks setting "Keyboard & Mouse"->"Additional Layout Options"->"Caps Lock behavior"->"Make Caps Lock an additional Ctrl", the CapsLock key is ignored in Factorio (for example "CapsLock+x" acts as "x" alone). Other linux applications understand CapsLock as control with this configuration.The output of xmodmap in this case
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), Caps_Lock (0x42), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), 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)
Workaround:
I tried setting "Keyboard & Mouse"->"Additional Layout Options"->"Caps Lock behavior"->"Disabled"and "Keyboard & Mouse"->"Additional Layout Options"->"Ctrl position"->"Caps Lock as ctrl" and both the Caps Lock and ctrl keys act as control in Factorio
The output of xmodmap in this case
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_L (0x42), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), 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)
More System info:
OS Name: Pop!_OS 22.04 LTSGNOME version: 42.9
Windowing System: X11
I use the default GNOME desktop which is "GNOME Shell 42.5"