hook up more control keys: home, end, page up, page down
parent
80376ce6da
commit
3b5a9caff5
2
TODO.md
2
TODO.md
|
|
@ -27,8 +27,6 @@ Improvements:
|
|||
* double-click to select a word
|
||||
* triple-click to select a line
|
||||
* shift-click and drag to continue selection
|
||||
* arrow keys do nothing, should send proper codes
|
||||
* home/end should scroll to top/bottom of scrollback
|
||||
|
||||
Major Features:
|
||||
|
||||
|
|
|
|||
|
|
@ -534,6 +534,10 @@ fn keyCallback(
|
|||
.down => .down,
|
||||
.right => .right,
|
||||
.left => .left,
|
||||
.home => .home,
|
||||
.end => .end,
|
||||
.page_up => .page_up,
|
||||
.page_down => .page_down,
|
||||
else => .invalid,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,6 +92,10 @@ pub const Config = struct {
|
|||
try result.keybind.set.put(alloc, .{ .key = .down }, .{ .csi = "B" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .right }, .{ .csi = "C" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .left }, .{ .csi = "D" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .home }, .{ .csi = "H" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .end }, .{ .csi = "F" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .page_up }, .{ .csi = "5~" });
|
||||
try result.keybind.set.put(alloc, .{ .key = .page_down }, .{ .csi = "6~" });
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ pub const Key = enum {
|
|||
down,
|
||||
right,
|
||||
left,
|
||||
home,
|
||||
end,
|
||||
page_up,
|
||||
page_down,
|
||||
|
||||
// To support more keys (there are obviously more!) add them here
|
||||
// and ensure the mapping is up to date in the Window key handler.
|
||||
|
|
|
|||
Loading…
Reference in New Issue