From 63e106390f4a99ad903449f4630c8eb2e41dc1bb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 13 Nov 2023 13:58:41 -0800 Subject: [PATCH] input: fix failing test on Linux --- src/input/KeyEncoder.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/input/KeyEncoder.zig b/src/input/KeyEncoder.zig index 9e1bc0bc4..521a78b95 100644 --- a/src/input/KeyEncoder.zig +++ b/src/input/KeyEncoder.zig @@ -344,6 +344,16 @@ fn legacyAltPrefix( } } + // If UTF8 isn't set, we will allow unshifted codepoints through. + if (self.event.unshifted_codepoint > 0) { + if (std.math.cast( + u8, + self.event.unshifted_codepoint, + )) |byte| { + return byte; + } + } + // Else, we can't figure out the byte to alt-prefix so we // exit this handling. return null;