add tab 9 keybind
This commit is contained in:
parent
221106b880
commit
2ad9a0fb40
2 changed files with 4 additions and 1 deletions
|
|
@ -1044,7 +1044,7 @@ pub const App = struct {
|
||||||
ctx.queueRefresh() catch |err| std.log.debug("queueRefresh failed: {t}", .{err});
|
ctx.queueRefresh() catch |err| std.log.debug("queueRefresh failed: {t}", .{err});
|
||||||
return ctx.consumeAndRedraw();
|
return ctx.consumeAndRedraw();
|
||||||
},
|
},
|
||||||
.tab_1, .tab_2, .tab_3, .tab_4, .tab_5, .tab_6, .tab_7, .tab_8 => {
|
.tab_1, .tab_2, .tab_3, .tab_4, .tab_5, .tab_6, .tab_7, .tab_8, .tab_9 => {
|
||||||
const idx = @intFromEnum(action) - @intFromEnum(keybinds.Action.tab_1);
|
const idx = @intFromEnum(action) - @intFromEnum(keybinds.Action.tab_1);
|
||||||
if (idx < tabs.len) {
|
if (idx < tabs.len) {
|
||||||
const target = tabs[idx];
|
const target = tabs[idx];
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ pub const Action = enum {
|
||||||
tab_6,
|
tab_6,
|
||||||
tab_7,
|
tab_7,
|
||||||
tab_8,
|
tab_8,
|
||||||
|
tab_9,
|
||||||
scroll_down,
|
scroll_down,
|
||||||
scroll_up,
|
scroll_up,
|
||||||
scroll_top,
|
scroll_top,
|
||||||
|
|
@ -128,6 +129,7 @@ pub const global_default_bindings = [_]Binding{
|
||||||
.{ .action = .tab_6, .key = .{ .codepoint = '6' } },
|
.{ .action = .tab_6, .key = .{ .codepoint = '6' } },
|
||||||
.{ .action = .tab_7, .key = .{ .codepoint = '7' } },
|
.{ .action = .tab_7, .key = .{ .codepoint = '7' } },
|
||||||
.{ .action = .tab_8, .key = .{ .codepoint = '8' } },
|
.{ .action = .tab_8, .key = .{ .codepoint = '8' } },
|
||||||
|
.{ .action = .tab_9, .key = .{ .codepoint = '9' } },
|
||||||
.{ .action = .scroll_down, .key = .{ .codepoint = 'd', .mods = .{ .ctrl = true } } },
|
.{ .action = .scroll_down, .key = .{ .codepoint = 'd', .mods = .{ .ctrl = true } } },
|
||||||
.{ .action = .scroll_up, .key = .{ .codepoint = 'u', .mods = .{ .ctrl = true } } },
|
.{ .action = .scroll_up, .key = .{ .codepoint = 'u', .mods = .{ .ctrl = true } } },
|
||||||
.{ .action = .scroll_top, .key = .{ .codepoint = 'g' } },
|
.{ .action = .scroll_top, .key = .{ .codepoint = 'g' } },
|
||||||
|
|
@ -166,6 +168,7 @@ pub const action_labels = std.enums.EnumArray(Action, []const u8).init(.{
|
||||||
.tab_6 = "Tab 6",
|
.tab_6 = "Tab 6",
|
||||||
.tab_7 = "Tab 7",
|
.tab_7 = "Tab 7",
|
||||||
.tab_8 = "Tab 8",
|
.tab_8 = "Tab 8",
|
||||||
|
.tab_9 = "Tab 9",
|
||||||
.scroll_down = "Half page down",
|
.scroll_down = "Half page down",
|
||||||
.scroll_up = "Half page up",
|
.scroll_up = "Half page up",
|
||||||
.scroll_top = "Scroll to top",
|
.scroll_top = "Scroll to top",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue