╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────╮ │ 5 const xitui = xit.xitui; │ │ 6 const wgt = xitui.widget; │ │ 7 const layout = xitui.layout; │ │ 8 -const inp = xitui.input; │ │ 8 +const Key = xitui.input.Key; │ │ 9 const Grid = xitui.grid.Grid; │ │10 const Focus = xitui.focus.Focus; │ │11 +const inp = @import("./input.zig"); │ │12 │ │13 pub const Header = @import("./Repo/Header.zig"); │ │14 pub const SubHeader = @import("./Repo/SubHeader.zig");│ ╰──────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │256 try self.box.build(allocator, constraint, root_focus); │ │257 } │ │258 │ │258 - pub fn input(self: *View, allocator: std.mem.Allocator, key: inp.Key, root_focus: *Focus) !void {│ │259 + pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { │ │260 if (self.getFocus().child_id) |child_id| { │ │261 if (self.box.children.getIndex(child_id)) |current_index| { │ │262 const child = &self.box.children.values()[current_index].widget; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │263 var index = current_index; │ │264 │ │264 - const Direction = enum { up, down, none }; │ │265 - const direction: Direction = switch (key) { │ │266 - .arrow_up => .up, │ │267 - .arrow_down => .down, │ │268 - .mouse => |mouse| if (mouse.action == .scroll) │ │269 - (if (mouse.action.scroll == .up) .up else .down)│ │270 - else │ │271 - .none, │ │272 - else => .none, │ │273 - }; │ │265 + const direction = inp.vertDirection(key); │ │266 │ │267 switch (direction) { │ │268 .up => { │ ╰─────────────────────────────────────────────────────────────────────────────╯