File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,6 +403,17 @@ inline fn parseCsi(input: []const u8, text_buf: []u8) Result {
403403 .n = sequence .len ,
404404 };
405405 },
406+ 'Z' = > {
407+ // Legacy keys
408+ // CSI Z
409+ return .{
410+ .event = .{ .key_press = .{
411+ .codepoint = Key .tab ,
412+ .mods = .{ .shift = true },
413+ } },
414+ .n = sequence .len ,
415+ };
416+ },
406417 '~' = > {
407418 // Legacy keys
408419 // CSI number ~
@@ -855,6 +866,18 @@ test "parse: xterm shift+up" {
855866 try testing .expectEqual (expected_event , result .event );
856867}
857868
869+ test "parse: xterm shift+tab" {
870+ const alloc = testing .allocator_instance .allocator ();
871+ const input = "\x1b [Z" ;
872+ var parser : Parser = .{};
873+ const result = try parser .parse (input , alloc );
874+ const expected_key : Key = .{ .codepoint = Key .tab , .mods = .{ .shift = true } };
875+ const expected_event : Event = .{ .key_press = expected_key };
876+
877+ try testing .expectEqual (3 , result .n );
878+ try testing .expectEqual (expected_event , result .event );
879+ }
880+
858881test "parse: xterm insert" {
859882 const alloc = testing .allocator_instance .allocator ();
860883 const input = "\x1b [2~" ;
You can’t perform that action at this time.
0 commit comments