Map Caps Lock to Control in Linux Mint
Solution 1
You can accomplish this with xmodmap
. Add the following to ~/.xmodmap
:
remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L
and run the command xmodmap ~/.xmodmap
. You can put this command in whatever startup files are processed by your WM or DE. This will only work in X but it will work regardless of what graphical environment you use.
Solution 2
I found it. It was moved to the regional preferences section:
Go to settings > regional preferences > keyboard layouts > settings and expand the caps lock section.
UPDATE:
In Linux Mint 17.1 you can get to it via;
System Settings > Hardware > Keyboard > Keyboard Layouts > Options > Caps Lock key behavior
Solution 3
No need to use the obsolete xmodmap
as there's already an xkb
option - namely ctrl:nocaps
e.g. in terminal:
setxkbmap -option ctrl:nocaps
With gnome 3 you can either use dconf-editor
and add ctrl:nocaps
to your xkb-options under org > gnome > desktop > input sources:
or simply enable Caps Lock as Ctrl in gnome-tweak-tool
under Typing > Ctrl key position:
Solution 4
I realize that this already has an accepted answer, but here is the One True Way to change Caps Lock to ctrl. This works on all versions of Linux, all distros, for the entire system (console, X, whatever). It sets the mapping in the kernel where it should be.
(echo $(dumpkeys |grep -i keymaps); echo keycode 58 = Control) | loadkeys -
Add this to a start up script (e.g., /etc/rc.local
, or create your own).
On Debian (and derivatives) dumpkeys/loadkeys is part of the kbd
package, if for some reason it's not already installed.
Solution 5
For LinuxMint 17 with KDE it was: System Settings > Input Devices > Keyboard > Advanced > Ctrl key position
Related videos on Youtube
joe77
Updated on September 18, 2022Comments
-
joe77 over 1 year
I am running the latest version of Linux Mint with Cinnamon. I'm trying to map Caps Lock to Ctrl, but I cannot figure out how to do it. All web searches I've done have led me to older versions of Linux Mint (there is no keyboard layout option in my settings). How can I do this?
-
Keith Thompson over 10 yearsCan you update your question to indicate exactly what the latest version is? This question could be here for years.
-
will over 7 yearsAs a guide line ... the 'current' Linux Mint release is #18 (~2016), so quoting "the latest" of almost anything in computing is going to rapidly fade the 'factual' colour. (Including this one.)
-
-
Zamicol over 9 yearsWhat would be an ideal place for this command for a user of Linux Mint Cinnamon?
-
Roy Truelove about 7 yearsUnf I wasn't able to get this working w/ Linux Mint 18.1. Tried both manually as root and also adding it to
/etc/rc.local
, and tried logout and restart -
Ján Lalinský almost 7 yearsDoesn't work on my Debian Jessie.
-
Ján Lalinský almost 7 yearssetxkbmap -option ctrl:nocaps seems to work well on Debian Jessie, thanks.
-
jchook about 4 yearsPerhaps worth mentioning
man keyboard
and also the permanent config location in/etc/default/keyboard
-
MichielB over 2 yearsUsing xmodmap and the solution in your startup file sucks a bit, there is no answer for the question Zamicol raised and if you'd put it in your .profile it will only be applied if you have your terminal opened. The solution by @don_crissti using gnome-tweak-tool is nicer; it allows the setting to be active when your WM starts