apprt/gtk: add ctrl+page-up/down as prev/next tab

This commit is contained in:
Mitchell Hashimoto
2023-09-29 22:04:30 -07:00
parent 659fa2cc66
commit a85c508892
2 changed files with 12 additions and 1 deletions

View File

@ -927,7 +927,7 @@ pub fn keyCallback(
// We only execute the binding on press/repeat but we still consume
// the key on release so that we don't send any release events.
log.debug("key event consumed by binding action={}", .{binding_action});
log.debug("key event binding consumed={} action={}", .{ consumed, binding_action });
if (event.action == .press or event.action == .repeat) {
try self.performBindingAction(binding_action);
}

View File

@ -602,6 +602,17 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
.{ .goto_split = .right },
);
try result.keybind.set.putUnconsumed(
alloc,
.{ .key = .page_up, .mods = .{ .ctrl = true } },
.{ .previous_tab = {} },
);
try result.keybind.set.putUnconsumed(
alloc,
.{ .key = .page_down, .mods = .{ .ctrl = true } },
.{ .next_tab = {} },
);
// Viewport scrolling
try result.keybind.set.put(
alloc,