17

I would like to remap the CAPSLOCK key to ESC as this is easier to use in Vim. I can make it in Ubuntu 11.04 as there's an option for this in Keyborad configuration. But recently I switched to use Linux Mint and found that there's no such option.

I don't know whether it is the gnome3 that makes this happen, as there are only some basic features to customize.

Hoping someone can help me remap the key, thanks in advance.

found this article, but the options are not found in Mint 12

imcoddy
  • 271
  • 1
  • 2
  • 5

4 Answers4

29
  1. Open the menu
  2. Open System ToolsSystem Settings
  3. Select Keyboard Layouts
  4. Select Options
  5. Select Caps Lock key behavior
  6. Select Make Caps Lock an additional ESC
  7. Close all of the windows and have yourself a nice cuppa, you are done!
Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
Kiltguy
  • 291
  • 3
  • 3
  • 1
    Fair warning, at least in 15+ it's now under Internationalization for some confounded reason. This is still valid as it's under keyboard layouts, but you'll find that under internationalization. – baweaver May 24 '14 at 18:21
  • 2
    In 17.1 (Cinnamon) it is under Keyboard in the settings. Or you can just type "keyboard" from the Menu to find it. Once there, there is a Keyboard Layouts tab and the steps are the same from there. – still_dreaming_1 Jun 18 '15 at 16:44
  • I think with this every caps lock hit will also toggles the caps along with ESC but we want to swap the keys. – prasad Dec 21 '16 at 23:39
7

Put this in your ~/.Xmodmap file:

remove Lock = Caps_Lock
remove Control = Escape
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
add Control = Escape

and then run xmodmap ~/.Xmodmap to make the changes effective immediately. Otherwise the next time you log in the changes will be effective.

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
dotancohen
  • 11,278
  • 19
  • 67
  • 96
2

You can use xmodmap for this. Instructions are for example on the Vim Wiki.

Lars Kotthoff
  • 1,543
  • 11
  • 9
  • thanks, though I don't really want to xmodmap to swap but this is the way to solve the question. – imcoddy Mar 11 '12 at 02:10
2

I was looking and looking for this too in Mint 15, and I found it.

  1. System Settings
  2. Regional Settings
  3. Layouts tab
  4. Options Button
  5. Ctrl key postion