I am finding that I cannot map the keypad-Enter key differently from the standard Enter key. I only observe this in Windows (XP and 7), both console and GUI versions of Vim 7.3.540, with no plugins.
To demonstrate this, I tried the following maps:
nnoremap <kEnter> :echo "kEnter"<CR> -- this is not triggered by Enter or keypad-Enternnoremap <Enter> :echo "Enter"<CR> -- this is triggered by both Enter and keypad-EnterSo, is it possible to map <Enter> and <kEnter> to do different things in Windows, or are my attempts futile?
Looks like a bug to me. Seems to be working fine on Linux. On Windows, the keypad enter key doesn't have a separate virtual key code (MSDN), but the two keys can be differentiated using the scan code. Vim probably doesn't do this.
I'm looking at this Autohotkey script that I made (screenkey.ahk) and I can see that it can tell apart Enter from NumpadEnter.
So I can only speculate that this is Vim bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With