pub struct KeybindingsManager { /* private fields */ }Expand description
Keybindings manager for loading and resolving keybindings
Implementations§
Source§impl KeybindingsManager
impl KeybindingsManager
Sourcepub fn from_settings(_settings: &Settings) -> Self
pub fn from_settings(_settings: &Settings) -> Self
Create from settings
Sourcepub fn register(&mut self, binding: KeyBinding)
pub fn register(&mut self, binding: KeyBinding)
Register a new keybinding
Sourcepub fn set_override(&mut self, action: &str, keys: Vec<String>)
pub fn set_override(&mut self, action: &str, keys: Vec<String>)
Set user override for an action
Sourcepub fn get_keys(&self, action: &str) -> Vec<String>
pub fn get_keys(&self, action: &str) -> Vec<String>
Get the resolved key sequence for an action
Sourcepub fn get_binding(&self, action: &str) -> Option<&KeyBinding>
pub fn get_binding(&self, action: &str) -> Option<&KeyBinding>
Get a binding by action name
Sourcepub fn all_bindings(&self) -> &HashMap<String, KeyBinding>
pub fn all_bindings(&self) -> &HashMap<String, KeyBinding>
Get all registered bindings
Sourcepub fn export_to_file(&self, path: &Path) -> Result<()>
pub fn export_to_file(&self, path: &Path) -> Result<()>
Export user overrides to file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeybindingsManager
impl RefUnwindSafe for KeybindingsManager
impl Send for KeybindingsManager
impl Sync for KeybindingsManager
impl Unpin for KeybindingsManager
impl UnsafeUnpin for KeybindingsManager
impl UnwindSafe for KeybindingsManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().