pub struct KeyBinding {
pub modes: Vec<Mode>,
pub modifiers: ModifiersState,
pub key: Key,
pub state: InputState,
pub command: Command,
pub is_toggle: bool,
pub display: Option<String>,
}Expand description
A key binding.
Fields§
§modes: Vec<Mode>The Modes this binding applies to.
modifiers: ModifiersStateModifiers which must be held.
key: KeyKey which must be pressed or released.
state: InputStateWhether the key should be pressed or released.
command: CommandThe Command to run when this binding is triggered.
is_toggle: boolWhether this key binding controls a toggle.
display: Option<String>How this key binding should be displayed to the user.
If None, then this binding shouldn’t be shown to the user.
Trait Implementations§
Source§impl Clone for KeyBinding
impl Clone for KeyBinding
Source§fn clone(&self) -> KeyBinding
fn clone(&self) -> KeyBinding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KeyBinding
impl RefUnwindSafe for KeyBinding
impl Send for KeyBinding
impl Sync for KeyBinding
impl Unpin for KeyBinding
impl UnwindSafe for KeyBinding
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