From 2fb8ad8196182d45caf65145d0c874f13e25be02 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 9 Aug 2023 07:40:55 -0700 Subject: [PATCH] linux default keybindings for scroll top, bot, page up, down --- src/config.zig | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/config.zig b/src/config.zig index de1954768..b5afc0684 100644 --- a/src/config.zig +++ b/src/config.zig @@ -435,15 +435,37 @@ pub const Config = struct { .{ .goto_split = .right }, ); - // Semantic prompts + // Viewport scrolling + try result.keybind.set.put( + alloc, + .{ .key = .home, .mods = .{ .shift = true } }, + .{ .scroll_to_top = {} }, + ); + try result.keybind.set.put( + alloc, + .{ .key = .end, .mods = .{ .shift = true } }, + .{ .scroll_to_bottom = {} }, + ); try result.keybind.set.put( alloc, .{ .key = .page_up, .mods = .{ .shift = true } }, - .{ .jump_to_prompt = -1 }, + .{ .scroll_page_up = {} }, ); try result.keybind.set.put( alloc, .{ .key = .page_down, .mods = .{ .shift = true } }, + .{ .scroll_page_down = {} }, + ); + + // Semantic prompts + try result.keybind.set.put( + alloc, + .{ .key = .page_up, .mods = .{ .shift = true, .ctrl = true } }, + .{ .jump_to_prompt = -1 }, + ); + try result.keybind.set.put( + alloc, + .{ .key = .page_down, .mods = .{ .shift = true, .ctrl = true } }, .{ .jump_to_prompt = 1 }, ); }