Linux Mint has the very cool feature of being able to modify your keyboard layout. The specific feature I was wanting to implement was swapping the Caps Lock key with the ESC key. Since I use esc all the time, I’m thinking that is going to be very useful although it might take a little while to become accustomed to the new positions for the keys.

Remapping your keyboard is a little bit buried, so here are the steps.

Step 1 - Open System Settings

Go into the System Settings and open the keyboard settings found in the “Hardware” area of the dialog.

System Settings

Note: If you are using a newer version of Linux Mint 22.3 and above, skip down to step 2-2

Step 2-1 - Open Keyboard (Mint<=22.2)

The keyboard dialog is where you can add keyboard layouts for additional languages. In this case, we will just click the ‘Options’ button on the lower right to open up the options for this particular layout.

Keyboard Dialog

Step 3-1 - Choose Layout (Mint<=22.2)

This opens the keyboard layout options dialog. You will see in the screenshot below, we are interested in the behavior of the Caps Lock key.

keyboard layout options

Expand the Caps Lock behavior option to see possible choices for the caps lock key.

Step 4-1 - Change your keys (Mint<=22.2)

In the opened options, you will see all the cool things that you can do with the caps lock key. The one we want is at the bottom ‘Swap Esc and Caps Lock’. Select that one and click the close button to exit the dialog.

Swap Escape and Caps Lock

Close out of all the other dialogs and at this point the Caps Lock key and escape key will be reversed.

Note: The following steps are for Mint 22.3 and greater.

Step 2-2 - Open Keyboard (Mint>=22.3)

The keyboard dialog is where you can add keyboard layouts for additional languages. In this case, we will just click the ‘XKB Options’ tab to open up the options. Next, click the + icon in the lower left.

XKB Options

Step 3-2 - Select an Option (Mint>=22.3)

Step 4-2 - Swap your keys (Mint>=22.3)

Conclusion

I find having the two keys swapped have been a real productivity enhancement after the initial adjustment period.

One funny thing I noticed… the caps lock on my keyboard has little light to indicate when caps lock is engaged. Now, when I hit the escape key, the light on the caps lock illuminates, letting me know the swap is working.