I've tried using the KDE's keyboard settings (Input devices -> Advanced -> Caps Lock behavior -> Swap Esc and Caps Lock), and it swapped them. Escape behaves as a Caps lock, but Caps lock now acts as ESC and it also changes register at the same time.

I used Gnome previously and achieved this using dconf-editor with custom xdb options. On tiling managers, I did this through an auto-loaded config file. But the problem was that when you unplug your keyboard, the settings are reset, since the script is only run on startup. So I want KDE do manage this by itself, which it fails to do for some reason.

How to properly configure Caps and ESC to be swapped on KDE without the issues I described (and preferrably without a .Xprofile script, since I want my settings to apply every time a keyboard is plugged in)?

  • You can look into udev scripts. They can run at boot and hotplug.
    – Tim
    Commented Jan 23, 2022 at 16:47

1 Answer 1


So I went with a temporary solution of just remapping CapsLock to Escape using "Make an additional Esc" option, since I don't really use the Caps Lock either way. This seems to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .