diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index 32e7c87..c15cdb3 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -34,6 +34,7 @@ ["alt+p", "goto_prev_file_or_diagnostic"], ["alt+l", "toggle_panel"], ["alt+i", "toggle_inputview"], + ["alt+k", "toggle_keybindview"], ["alt+x", "open_command_palette"], ["alt+f3", "toggle_auto_find"], ["f4", "toggle_input_mode"], @@ -415,6 +416,7 @@ ["alt+p", "palette_menu_up"], ["alt+l", "toggle_panel"], ["alt+i", "toggle_inputview"], + ["alt+k", "toggle_keybindview"], ["f9", "theme_prev"], ["f10", "theme_next"], ["f11", "toggle_panel"], diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index af31b5d..cbd8db0 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -31,6 +31,7 @@ const logview = @import("logview.zig"); const filelist_view = @import("filelist_view.zig"); const info_view = @import("info_view.zig"); const input_view = @import("inputview.zig"); +const keybind_view = @import("keybindview.zig"); const Self = @This(); const Commands = command.Collection(cmds); @@ -845,6 +846,11 @@ const cmds = struct { } pub const toggle_inputview_meta: Meta = .{ .description = "Toggle raw input log" }; + pub fn toggle_keybindview(self: *Self, _: Ctx) Result { + try self.toggle_panel_view(keybind_view, .toggle); + } + pub const toggle_keybindview_meta: Meta = .{ .description = "Toggle keybind log" }; + pub fn toggle_inspector_view(self: *Self, _: Ctx) Result { try self.toggle_panel_view(@import("inspector_view.zig"), .toggle); }