fix(gui): private use unicode codepoints are not text

This commit is contained in:
CJ van den Berg 2026-04-08 12:21:08 +02:00
parent d05741ba24
commit 8e4f5f4e17
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -658,7 +658,7 @@ fn sendKey(kind: u8, codepoint: u21, shifted_codepoint: u21, mods: input_transla
// Text is the character that would be typed: empty when ctrl/alt active, // Text is the character that would be typed: empty when ctrl/alt active,
// shifted_codepoint when shift is held, otherwise codepoint. // shifted_codepoint when shift is held, otherwise codepoint.
const text_cp: u21 = if (mods.shift) shifted_codepoint else codepoint; const text_cp: u21 = if (mods.shift) shifted_codepoint else codepoint;
const text_len: usize = if (!mods.ctrl and !mods.alt and text_cp >= 0x20 and text_cp != 0x7f) const text_len: usize = if (!mods.ctrl and !mods.alt and text_cp >= 0x20 and text_cp != 0x7f and text_cp < 0xE000)
std.unicode.utf8Encode(text_cp, &text_buf) catch 0 std.unicode.utf8Encode(text_cp, &text_buf) catch 0
else else
0; 0;