From 2ff2e018ba6aedeea8e18a1926631a0b51cb4b45 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 16 Aug 2023 14:04:38 -0700 Subject: [PATCH] input: clarify why we use all mods for unicode CSI u --- src/input/KeyEncoder.zig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/input/KeyEncoder.zig b/src/input/KeyEncoder.zig index 639cf9209..9dfc5f8ae 100644 --- a/src/input/KeyEncoder.zig +++ b/src/input/KeyEncoder.zig @@ -120,16 +120,17 @@ pub fn legacy( // At this stage of key processing, we only need to apply fixterms // to unicode codepoints if we have ctrl set. if (self.event.mods.ctrl) { - // Important: we want to use the original - const csi_u_mods = CsiUMods.fromInput(binding_mods); + // Important: we want to use the original mods here, not the + // effective mods. The fixterms spec states the shifted chars + // should be sent uppercase but Kitty changes that behavior + // so we'll send all the mods. + const csi_u_mods = CsiUMods.fromInput(self.event.mods); const result = try std.fmt.bufPrint( buf, "\x1B[{};{}u", .{ utf8[0], csi_u_mods.seqInt() }, ); - - std.log.warn("CSI_U: {s}", .{result}); - + // std.log.warn("CSI_U: {s}", .{result}); return result; }