Monday, January 28, 2013

Re: command using numeric keypad

On Sunday, January 27, 2013 3:51:28 AM UTC-6, rameo wrote:
> I would like to associate commands with the numeric keypad
>
> ctrl + -> (number 6 on the numeric keypad with numlock enabled)
>
> I don't know how to do this.
> Can anyone help me?

Some versions of Vim probably cannot tell the difference between 6 on the main keyboard and 6 on the keypad.

Try mapping <C-k6> to see if it works. <kEnter>, <k0>, <k1>, ..., <k9>, and other items refer to the numeric keypad keys.

This works for me in Windows gvim (which actually surprised me):

:imap <buffer> <k6> six

I.e., when I press the 6 on my main keyboard, it enters '6' in insert mode, but if I press 6 on the numeric keypad, it enters "six".

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group, send email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment