mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-01 06:17:34 +03:00
input: repeat events need to be handled for Kitty w/o report events
This commit is contained in:
@ -42,7 +42,7 @@ fn kitty(
|
|||||||
if (self.kitty_flags.int() == 0) return try self.legacy(buf);
|
if (self.kitty_flags.int() == 0) return try self.legacy(buf);
|
||||||
|
|
||||||
// We only processed "press" events unless report events is active
|
// We only processed "press" events unless report events is active
|
||||||
if (self.event.action != .press and !self.kitty_flags.report_events)
|
if (self.event.action == .release and !self.kitty_flags.report_events)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
const all_mods = self.event.mods;
|
const all_mods = self.event.mods;
|
||||||
@ -737,6 +737,23 @@ test "kitty: plain text" {
|
|||||||
try testing.expectEqualStrings("abcd", actual);
|
try testing.expectEqualStrings("abcd", actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "kitty: repeat with just disambiguate" {
|
||||||
|
var buf: [128]u8 = undefined;
|
||||||
|
var enc: KeyEncoder = .{
|
||||||
|
.event = .{
|
||||||
|
.key = .a,
|
||||||
|
.action = .repeat,
|
||||||
|
.mods = .{},
|
||||||
|
.utf8 = "a",
|
||||||
|
},
|
||||||
|
|
||||||
|
.kitty_flags = .{ .disambiguate = true },
|
||||||
|
};
|
||||||
|
|
||||||
|
const actual = try enc.kitty(&buf);
|
||||||
|
try testing.expectEqualStrings("a", actual);
|
||||||
|
}
|
||||||
|
|
||||||
test "kitty: enter, backspace, tab" {
|
test "kitty: enter, backspace, tab" {
|
||||||
var buf: [128]u8 = undefined;
|
var buf: [128]u8 = undefined;
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user