vimkeyextra

Vim Map extra keys in Razer keyboard


I just bought a Razer mechanical keyboard with extra keys such as M1, M2 to M5. I'm wondering whether Vim can map those extra keys? It would be appreciated if anyone can give me some suggestions on how to do it.


Solution

  • As a start, you could see whether Vim thinks they have a useful value already. iCtrl-v then the key you're interested in. (For example, iCtrl-vEnter produces ^M.) You could then bind the resulting key using nnoremap et al.

    If they're not already recognised, the solution will be OS-dependent. You'd need to map the keys to something unused (maybe F15-F20?) and bind those in your .vimrc.