I have a relatively fresh installation of Arch with Hyprland. When using Vim in Kitty, numpad enter inserts the following symbol:
instead inserting a newline/executing the typed command. (It doesn't render on my system, but maybe it does on others?)
It does this in both Insert mode and Command mode.
Initially I suspected it due to some strange bug in Kitty, but this test:
Press any keys - Ctrl+D will terminate this program
UNIX send_text
^M \r
^M \r
^M \r
^M \r
proves that both enters do the exact same thing in the shell. So it must be a problem in Vim somehow?
What could cause this and how can I fix it?
I am using Vim 9.1.532 if that matters. I'm also using a vimrc that I've been using for years on dozens of computers.
:echo getchar()
then press both Enter keys and see what they return? The one that works should return 13, but I suspect the one from the keypad might return something different, potentially longer:let &t_KA = nr2char(57414)
Yes it's a workaround, but you can still make your vimrc only apply that under Kitty (by looking at theterm
setting)