mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 07:16:12 +00:00
input: remove translated
This commit is contained in:
@@ -56,7 +56,7 @@ pub const Event = struct {
|
||||
// Write our key. If we have an invalid key we attempt to write
|
||||
// the utf8 associated with it if we have it to handle non-ascii.
|
||||
try writer.writeAll(switch (self.event.key) {
|
||||
.invalid => if (self.event.utf8.len > 0) self.event.utf8 else @tagName(.invalid),
|
||||
.unidentified => if (self.event.utf8.len > 0) self.event.utf8 else @tagName(self.event.key),
|
||||
else => @tagName(self.event.key),
|
||||
});
|
||||
|
||||
@@ -227,9 +227,9 @@ test "event string" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
|
||||
var event = try Event.init(alloc, .{ .key = .a });
|
||||
var event = try Event.init(alloc, .{ .key = .key_a });
|
||||
defer event.deinit(alloc);
|
||||
|
||||
var buf: [1024]u8 = undefined;
|
||||
try testing.expectEqualStrings("Press: a", try event.label(&buf));
|
||||
try testing.expectEqualStrings("Press: key_a", try event.label(&buf));
|
||||
}
|
||||
|
Reference in New Issue
Block a user