mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
feat: keybind escape sequence action "esc:text" similar to "csi:text"
This commit is contained in:
@@ -117,6 +117,9 @@ pub const Action = union(enum) {
|
||||
/// without the CSI header ("ESC ]" or "\x1b]").
|
||||
csi: []const u8,
|
||||
|
||||
/// Send an ESC sequence.
|
||||
esc: []const u8,
|
||||
|
||||
/// Send data to the pty depending on whether cursor key mode is
|
||||
/// enabled ("application") or disabled ("normal").
|
||||
cursor_key: CursorKey,
|
||||
@@ -665,6 +668,12 @@ test "parse: action with string" {
|
||||
try testing.expect(binding.action == .csi);
|
||||
try testing.expectEqualStrings("A", binding.action.csi);
|
||||
}
|
||||
// parameter
|
||||
{
|
||||
const binding = try parse("a=esc:A");
|
||||
try testing.expect(binding.action == .esc);
|
||||
try testing.expectEqualStrings("A", binding.action.esc);
|
||||
}
|
||||
}
|
||||
|
||||
test "parse: action with enum" {
|
||||
|
||||
Reference in New Issue
Block a user