Skip to main content

KeyHandler

Type Alias KeyHandler 

Source
pub type KeyHandler<S> = Arc<dyn Fn(&mut S, &KeyCode, u8) -> bool + Send + Sync>;
Expand description

Type alias for an application-level key handler.

Receives (&mut S, &KeyCode, modifiers) and returns true if the key was consumed.

Aliased Typeยง

pub struct KeyHandler<S> { /* private fields */ }