vimdiff as well as the other binaries are just symbolic links to the actual vim binary. This is done because when vim starts up it checks under which name it has been started and does perform some extras (like running diff mode for vimdiff, starting the gui for gvim, or just starting in read-only mode for view or starting in ex mode for ex).
So in short the ...
There are special keys <k0> to <k9> and <kPlus>, <kMinus>, <kDivide>, <kMultiply>, <kEnter>, and <kPoint>, which can be mapped separately, e.g.,
inoremap <k0> Zero
inoremap <k1> One
I checked this with GVim running on Windows 7; the behavior on macOS might be different.
Got an answer on the vim_use Google group. It came down to priorities, and which vimrc is being used. For MacVim, there's a .gvimrc as well as a .vimrc file, and the .gvimrc file was overriding the .vimrc settings. Once I copied the .vimrc file to .gvimrc with the following changes in particular, I got the same view:
set tabstop=4 softtabstop=0 expandtab ...
Seeing <ESC> used as the LHS of a key mapping causes me some discomfort. You've demonstrated one reason why...it doesn't seem to work right in a vimrc file. It doesn't matter what you have on the RHS, the LHS <ESC> causes some characters (maybe related to the underlying key code for <ESC>) to be emitted as if they were Normal mode commands ...
I found a solution.
Attaching the ui by |nvim_ui_attach()| method with option `ext_cmdline=true',
then the cmdline_xxxx methods are callback from neovim.