pub struct KeyMap { /* private fields */ }Expand description
Configurable key-to-action bindings
KeyMap provides a mapping from KeyInput to Action, allowing users
to customize key bindings without modifying behavior.
§Examples
use fast_fs::nav::{KeyMap, KeyInput, Action};
// Start with default bindings
let mut keymap = KeyMap::default();
// Customize: use Delete key for delete action
keymap.unbind(&KeyInput::Char('d'));
keymap.bind(KeyInput::Delete, Action::Delete);
// Or start empty and add only what you need
let mut minimal = KeyMap::empty();
minimal.bind(KeyInput::Up, Action::MoveUp);
minimal.bind(KeyInput::Down, Action::MoveDown);
minimal.bind(KeyInput::Enter, Action::Enter);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyMap
impl RefUnwindSafe for KeyMap
impl Send for KeyMap
impl Sync for KeyMap
impl Unpin for KeyMap
impl UnwindSafe for KeyMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more