pub fn default_keymap() -> Keymap<Action>Available on crate feature
json-viewer only.Expand description
The default viewer shortcuts:
| Keys | Action |
|---|---|
ArrowDown | Action::Next |
ArrowUp | Action::Previous |
Home | Action::First |
End | Action::Last |
ArrowRight | Action::Expand |
ArrowLeft | Action::Collapse |
Enter | Action::Toggle |
* | Action::ExpandSiblings |
Mod+Shift+ArrowRight | Action::ExpandAll |
Mod+Shift+ArrowLeft | Action::CollapseAll |
Mod+C (Ctrl, or Cmd on macOS) | Action::CopyValue |
Mod+Shift+C | Action::CopyPath |
Mod+F | Action::FocusSearch |
Escape | Action::ClearSearch |
F3 | Action::NextMatch |
Shift+F3 | Action::PreviousMatch |
Enter does what a double click does, as in the tree, where it activates
a node: here it opens or closes an object or array. Space is left free,
since the viewer has nothing to select, and Shift+Arrow is left alone,
as other views extend a selection with it. While the search box has
focus, Enter and F3 step to the next match and Shift+Enter and Shift+F3
to the previous one, Mod+F selects its text, and Escape clears it, then
a second Escape leaves it. The viewer resolves these itself,
only while it has focus, so they never clash with other components.
Pass a changed keymap with JsonViewer::keymap.