How keys was defined in terminal¶
This had never been a issue until I give up vimr and use kitty + neovim. I found that my <S-Fn> no longer works.
Well, do panic, use infocmp or keybind or keycode to find out how the key is defined (also can use cat or sed
-n -l).
For kitty <S-F1> key code is ^[[1;2P . Here ^[ means <Esc> or \E
vim and neovim handle key code slight different.
for neovim, S-Fn was map to F(12+n) , e.g. S-f1 mapped to F13. So you can do this:
vim is slightly different.:help keycode
So put it all together