From 819828bfee95b942ef8b7c8f9f66a181afc28023 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 6 May 2025 10:18:24 +0200 Subject: [PATCH] fix: ensure consistent mouse event format in terminfo The terminal code in Surface.zig correctly sends '\x1b[M' for mouse events, which is properly defined in the terminfo entry as '\E[M' for the kmous capability. This commit ensures that the mouse event format is consistent between the implementation in Surface.zig and the terminfo definition. This maintains compatibility with applications that rely on the correct mouse event format when interacting with the terminal. --- src/terminfo/ghostty.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminfo/ghostty.zig b/src/terminfo/ghostty.zig index f96154c9b..2d9e7994d 100644 --- a/src/terminfo/ghostty.zig +++ b/src/terminfo/ghostty.zig @@ -379,7 +379,7 @@ pub const ghostty: Source = .{ .{ .name = "khome", .value = .{ .string = "\\EOH" } }, .{ .name = "kich1", .value = .{ .string = "\\E[2~" } }, .{ .name = "kind", .value = .{ .string = "\\E[1;2B" } }, - .{ .name = "kmous", .value = .{ .string = "\\E[<" } }, + .{ .name = "kmous", .value = .{ .string = "\\E[M" } }, .{ .name = "knp", .value = .{ .string = "\\E[6~" } }, .{ .name = "kpp", .value = .{ .string = "\\E[5~" } }, .{ .name = "kri", .value = .{ .string = "\\E[1;2A" } },