ratatui_toolkit/primitives/tree_view/keybindings/constructors/
default.rs

1use crossterm::event::KeyCode;
2
3use crate::primitives::tree_view::keybindings::TreeKeyBindings;
4
5impl Default for TreeKeyBindings {
6    fn default() -> Self {
7        Self {
8            next: vec![KeyCode::Char('j'), KeyCode::Down],
9            previous: vec![KeyCode::Char('k'), KeyCode::Up],
10            expand: vec![KeyCode::Char('l'), KeyCode::Right],
11            collapse: vec![KeyCode::Char('h'), KeyCode::Left],
12            toggle: vec![KeyCode::Enter],
13            goto_top: vec![KeyCode::Char('g')],
14            goto_bottom: vec![KeyCode::Char('G')],
15        }
16    }
17}