defaults
Use the platform default navigation keys.
Source
Implementation
pub fn defaults() NavigationKeys {
const cw = dvui.currentWindow();
return .{
.up = .{ .key = .up, .shift = false, .control = false, .command = false, .alt = false },
.down = .{ .key = .down, .shift = false, .control = false, .command = false, .alt = false },
.left = cw.keybinds.get("prev_widget") orelse unreachable,
.right = cw.keybinds.get("next_widget") orelse unreachable,
.first = cw.keybinds.get("text_start") orelse unreachable,
.last = cw.keybinds.get("text_end") orelse unreachable,
.col_first = .{}, // Typically "home". Not bound by default so TextEntryWidget can process.
.col_last = .{}, // Typically "end". Not bound by default so TextEntryWidget can process.
.scroll_up = .{ .key = .page_up },
.scroll_down = .{ .key = .page_down },
};
}