Reputation: 2653
I am currently using vim editor and want to customize my keys
I have learned how to map certain keys to keys by searching documentations,
but failed to find how the special keys are defined in vim.
for example, I have to use map <Esc> <CR>
instead of map esc enter
I want to change ctrl key to caps lock key, but cannot find how that special keys are represented in vim editor.
Also want to change :w to something.
failed to find recommended documentations, some advice would be appreciated!
Upvotes: 1
Views: 776
Reputation: 6016
You can find all special Key notations by entering :h key-notation
. :h key-codes
or :h keycodes
.
But Vim will not receive the press of a key Like Capslock
or Ctrl
(Modifiers). The OS does not pass it to vim. Vim will only know about Ctrl
the moment a second key is pressed, and receive the result of them both: Ctrl+p
for example is one keypress for vim.
It is the same with Capslock. Vim will just receive the modified Character. So if Capslock is on and you press a
vim will not receive Capslock+a
but only A
because that is the result of both.
Upvotes: 3