Home » Questions » Computers [ Ask a new question ]

Vim command to map CapsLock to Escape

Vim command to map CapsLock to Escape

What command do I have to enter to be able to leave editmode by pressing CapsLock in Vim?

Asked by: Guest | Views: 200
Total answers/comments: 2
Guest [Entry]

"In Linux, use the xmodmap utility

xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'

In Windows, you can use AutoHotkeys, or change your registry settings.

See this tip from Vim wiki for detailed instructions for Windows and also the linked tip for Linux."
Guest [Entry]

Unfortunately, it's not as simple as just entering a command, but it is a well-investigated topic. I'd go with the AutoHotkey method, if I were you.