mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
hook up more control keys: home, end, page up, page down
This commit is contained in:
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.
|
||||
|
Reference in New Issue
Block a user