mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00
input: clarify why we use all mods for unicode CSI u
This commit is contained in:
@ -120,16 +120,17 @@ pub fn legacy(
|
|||||||
// At this stage of key processing, we only need to apply fixterms
|
// At this stage of key processing, we only need to apply fixterms
|
||||||
// to unicode codepoints if we have ctrl set.
|
// to unicode codepoints if we have ctrl set.
|
||||||
if (self.event.mods.ctrl) {
|
if (self.event.mods.ctrl) {
|
||||||
// Important: we want to use the original
|
// Important: we want to use the original mods here, not the
|
||||||
const csi_u_mods = CsiUMods.fromInput(binding_mods);
|
// 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(
|
const result = try std.fmt.bufPrint(
|
||||||
buf,
|
buf,
|
||||||
"\x1B[{};{}u",
|
"\x1B[{};{}u",
|
||||||
.{ utf8[0], csi_u_mods.seqInt() },
|
.{ utf8[0], csi_u_mods.seqInt() },
|
||||||
);
|
);
|
||||||
|
// std.log.warn("CSI_U: {s}", .{result});
|
||||||
std.log.warn("CSI_U: {s}", .{result});
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user