Map caps lock key to control


I would like to map my caps lock key to ctrl key, how do I do that ?


Can I ask why would you want to do that? Even if you’re not a keyboard cowboy there is still a lot you lose if you don’t have access to control.

indeed… Ctrl is used in many ways of emergency too … could be an ZY problem ? :wink:

1 Like

welcome, @murtaza52 :enos_flag:

do you maybe mean making caps lock as another Control key, do you (I guess because some emacs-fu probably)?

if you’re in a DE, you can usually accomplish that via keyboard settings (in gnome, for example, look at settings-keyboard in gnome tweaks), otherwise you can leverage one of the utilities mentioned in this Archwiki article.
If you’re using Xorg and not Wayland, you might also use Xkb or the even older Xmodmap, but those two might be slightly more cumbersome.
As the others have mentioned, if you want, on the other hand, make your Control a Caps Lock, well…think twice about that :sweat_smile:

1 Like
setxkbmap -option ctrl:nocaps

I also set:

setxkbmap -option shift:both_capslock

To trigger the caps lock, if I do need it. I have both in a script that runs on startup.

1 Like

Hi Everyone,

I am using emacs and thus want to make the change. I dont want to remove the ctrl key, infact I want to make the caps lock key also as the ctrl key.

So I am going to loose the caps lock key.

I am using i3wm, before this I have always used gnome, and was able to graphically map the keys there.

@xircon thanks, that worked. The second setting setxkbmap -option shift:both_capslock is trigerred by pressing both shift ?

Yes, fellow emacs user here :smiley:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.