Skip to main content

KeyInputExt

Trait KeyInputExt 

Source
pub trait KeyInputExt<This>{
    // Required methods
    fn apply_keystroke(&mut self, stroke: Keystroke) -> bool;
    fn apply_paste(&mut self, text: &str) -> bool;
    fn apply_binding(&mut self, binding: ManagerKeyBinding<This>) -> bool;
}
Expand description

Interprets input as the intentions it denotes.

Required Methods§

Source

fn apply_keystroke(&mut self, stroke: Keystroke) -> bool

Applies what one keystroke denotes, and observes whether it denoted anything.

A gated binding applies only while its action has meaning, so a disabled menu entry and a pressed key refuse the same intention.

Source

fn apply_paste(&mut self, text: &str) -> bool

Applies what pasted text denotes, and observes whether it denoted anything.

Source

fn apply_binding(&mut self, binding: ManagerKeyBinding<This>) -> bool

Applies one binding while the action gating it has meaning.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§