pub struct Hotkeys {
map: HashMap<Action, Option<KeyboardShortcut>>,
}Fields§
§map: HashMap<Action, Option<KeyboardShortcut>>Implementations§
Source§impl Hotkeys
impl Hotkeys
pub fn defaults() -> Self
pub fn from_settings(s: &Settings) -> Self
Sourcepub fn to_settings(&self, s: &mut Settings)
pub fn to_settings(&self, s: &mut Settings)
Store only bindings that differ from the defaults.
pub fn get(&self, a: Action) -> Option<KeyboardShortcut>
Sourcepub fn set(&mut self, a: Action, ks: Option<KeyboardShortcut>)
pub fn set(&mut self, a: Action, ks: Option<KeyboardShortcut>)
Bind a to ks (None = unbound). Any other action using the same shortcut is unbound.
pub fn reset(&mut self, a: Action)
pub fn reset_all(&mut self)
Sourcepub fn conflict(&self, ks: KeyboardShortcut) -> Option<Action>
pub fn conflict(&self, ks: KeyboardShortcut) -> Option<Action>
Which action (if any) already uses this shortcut.
pub fn format(ks: &KeyboardShortcut) -> String
pub fn parse(s: &str) -> Option<KeyboardShortcut>
Sourcepub fn poll(&self, ctx: &Context) -> Vec<Action>
pub fn poll(&self, ctx: &Context) -> Vec<Action>
Consume matching shortcuts this frame. Nothing fires while a text field has focus.
Sourcepub fn poll_late(&self, ctx: &Context) -> Vec<Action>
pub fn poll_late(&self, ctx: &Context) -> Vec<Action>
Second pass, run after the panes are drawn: the clip clipboard keys, which the curve and node editors also claim while the pointer is over them (whoever is hovered wins, the timeline is the fallback).
fn poll_pass(&self, ctx: &Context, late: bool) -> Vec<Action>
Auto Trait Implementations§
impl Freeze for Hotkeys
impl RefUnwindSafe for Hotkeys
impl Send for Hotkeys
impl Sync for Hotkeys
impl Unpin for Hotkeys
impl UnwindSafe for Hotkeys
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more