summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/patches.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/build/patches.zig b/build/patches.zig
index 7c7b2d60..7d87b9f1 100644
--- a/build/patches.zig
+++ b/build/patches.zig
@@ -34,7 +34,8 @@ fn apply(b: *std.Build, patch: *std.Build.Step.Compile, dep: *std.Build.Dependen
/// startup width queries' `CSI 1;1R` arrived as two F3s, which a shell
/// pane took for text (build/patches/vaxis_parser.zig).
/// - ESC before a CSI or SS3 key (rxvt's Alt+arrow) is Alt on that key,
-/// not Alt+Escape followed by `[A` as text.
+/// not Alt+Escape followed by `[A` as text; before anything else (a
+/// mouse report: Alt is in its button) it is the Escape key.
/// - An X10 mouse report and a kitty graphics reply cut short by a read
/// wait for their rest: the first became three bytes of text, the
/// second sliced past its input.
@@ -56,7 +57,7 @@ const vaxis_parser = [_]Edit{
\\ if (inner.n == 0) return inner;
\\ if (inner.event) |*event| switch (event.*) {
\\ .key_press, .key_release => |*key| key.mods.alt = true,
- \\ else => {},
+ \\ else => return .{ .event = .{ .key_press = .{ .codepoint = Key.escape } }, .n = 1 },
\\ };
\\ inner.n += 1;
\\ return inner;