From 052ff24c2fe92d0771f5a884290d3705c11d63f2 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 3 Jun 2024 06:19:02 -0500 Subject: [PATCH] mouse: enable button motion tracking and any motion Zellij doesn't support any motion at time of this commit, so we also try to enable button motion first --- src/ctlseqs.zig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ctlseqs.zig b/src/ctlseqs.zig index 33acfd1..a911f95 100644 --- a/src/ctlseqs.zig +++ b/src/ctlseqs.zig @@ -12,10 +12,13 @@ pub const csi_u_query = "\x1b[?u"; pub const kitty_graphics_query = "\x1b_Gi=1,a=q\x1b\\"; pub const sixel_geometry_query = "\x1b[?2;1;0S"; -// mouse -pub const mouse_set = "\x1b[?1003;1004;1006h"; -pub const mouse_set_pixels = "\x1b[?1003;1004;1016h"; -pub const mouse_reset = "\x1b[?1003;1004;1006;1016l"; +// mouse. We try for button motion and any motion. terminals will enable the +// last one we tried (any motion). This was added because zellij doesn't +// support any motion currently +// See: https://github.com/zellij-org/zellij/issues/1679 +pub const mouse_set = "\x1b[?1002;1003;1004;1006h"; +pub const mouse_set_pixels = "\x1b[?1002;1003;1004;1016h"; +pub const mouse_reset = "\x1b[?1002;1003;1004;1006;1016l"; // sync pub const sync_set = "\x1b[?2026h";