Using Vim 9.0.2000 and Kitty 0.30.1 on macOS 12.5. Both applications installed via Homebrew.
Term is set to xterm-kitty and :verbose map shows that the Kitty keyboard protocol is turned on.
vim -u NONE to bypass my .vimrc etc.set nocompatible:map <F3> :echo "hello"<CR>Doing the same with the other function keys does work and print a "hello" message.
The output of <C-V><F3> in insert mode shows ^[[13~.
kitten show-key --key-mode kitty shows the following when pressing F3:
F3 PRESS
CSI 13 ~
F3 RELEASE
CSI 13 ; 1 : 3 ~
Status bar should have shown "hello".
9.0.2000
macOS 12.5
Vim 9.0.2000
Kitty 0.30.1
Term is set to xterm-kitty and :verbose map shows that the Kitty keyboard protocol is turned on.
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
does this only affect F3? can you run with --log filename and show the filename output please?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Here is a log file containing the following events:
set nocompatibleI have tried this with all function keys from F1 up to F10, and only F3 seems to be affected.
There is a comment in the Kitty keyboard protocol specification about a special case for F3, perhaps this may shed some light on the issue. https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions (at the bottom of the linked section).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Hm, if I understand this correctly:
0.015215000 : Adding termcap entry k2 to �OQ
0.015222000 : Adding termcap entry k3 to �OR
Then those are the byte codes for f2 and f3 and those come from termcap:
infocmp -L -1 xterm-kitty|grep 'key_f[1-9]='
key_f1=\EOP,
key_f2=\EOQ,
key_f3=\EOR,
key_f4=\EOS,
key_f5=\E[15~,
key_f6=\E[17~,
key_f7=\E[18~,
key_f8=\E[19~,
key_f9=\E[20~,
You can see, that key_f3 is wrong, your f3 sends actually \E[13~ instead.
You can fix this in Vim using:
:set t_kf3=<c-v><f3> (this means, press Ctrl-V followed by f3, to get the key value literally).
I am not sure this is something to fix in Vim, I would hope the termcap database will get updated eventually.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
to add to this, I think it should also be possible to compile your own termcap entry with a fixed f3 code, which you could then use and I think Vim would then recognize your key.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #13328 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()