Extend the SGR Pixel mouse reporting protocol to also report when the mouse leaves the window

This commit is contained in:
Kovid Goyal 2025-07-12 11:59:23 +05:30
parent c3360cd76e
commit 4d3bbd82e0
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
8 changed files with 87 additions and 24 deletions

View file

@ -29,6 +29,19 @@ there is only one number to reset these attributes, SGR 22, which resets both.
There is no way to reset one and not the other. kitty uses 221 and 222 to reset
bold and faint independently.
.. _mouse_leave_window:
Reporting when the mouse leaves the window
----------------------------------------------
kitty extends the SGR Pixel mouse reporting protocol created by xterm to
also report when the mouse leaves the window. This is event is delivered
encoded as a normal SGR pixel event except that the eight bit is set on the
first number. bits 1-7 are used to encode button and modifier information.
When bit 8 is set it means the event is a mouse has left the window event,
and all other bits should be ignored. The pixel position values must also
be ignored as they may not be accurate.
kitty specific private escape codes
---------------------------------------