> If you mean the response to the secondary device attributes query
> kitty will always send
> 1; 4000 + primary kitty version number ; secondary kitty version number
> 
> so if the kitty version number is 1.23.45 you will get 1;4001;23
> For the current kitty release you will get 
> 1;4000;26 since the kitty version number is 0.26.4
> 
> Incidentally the adding of 4000 was put in there precisely because of
> vim turning on SGR_MOUSE mode only if the number was high enough. 

Thanks, that is something I can use.  Better than checking $TERM for
containing "kitty".

> And just touching briefly on our last discussion, in order to get this
> response, you have to send the terminal the bytes ```ESC[>c ```. To
> query for the kitty keyboard protocol you need to send ```ESC[?u```.
> Since you are not worried about the former "leaking" on terminals that
> do not handle it, its a bit, umm extreme, to be worrying about the
> latter leaking. Both are very simple CSI escape codes. If there is
> indeed a terminal out there that parses the former and not the latter
> I would be amazed.

Maybe I'm paranoid, but unfortunately there are so many terminal
emulators out there that started out as a nice idea, but don't meet all
the requirements.  And some are not responsive to bug reports (the Mac
Terminal app is a good example, they seem to only fix security issues,
and even then it takes many weeks). Oh, I actually have some code
commented out for Konsole because t_u8 doesn't work.

Let me make a patch with my best guess, then we can see if it works well
enough or needs something more.

I wonder if there is a way to set a "seenKittyKeys" flag.  Not sure it's
even needed, but we do need seenModifyOtherKeys, thus we might need it
to avoid matching the simplified form.  Anyway, then users can just
enable the Kitty keyboard protocol (in Vim or in terminfo/termcap) and
it would work without further settings.

-- 
ARTHUR: The swallow may fly south with the sun, or the house martin or the
        plover seek warmer hot lands in winter, yet these are not strangers to
        our land.
SOLDIER: Are you suggesting coconuts migrate?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221021130812.726041C0762%40moolenaar.net.

Raspunde prin e-mail lui