Skip to main content

OnKeyEventCallback

Type Alias OnKeyEventCallback 

Source
pub type OnKeyEventCallback = Rc<dyn Fn(&mut App, &KeyEvent) -> KeyEventResult>;
Expand description

Signature of a callback used by FocusManager::add_early_key_event_handler and FocusManager::add_late_key_event_handler.

The event parameter is a KeyEvent that is being sent to the callback to be handled.

The KeyEventResult return value indicates whether or not the event will continue to be propagated. If the value returned is KeyEventResult::Handled or KeyEventResult::SkipRemainingHandlers, then the event will not continue to be propagated.

Aliased Typeยง

pub struct OnKeyEventCallback { /* private fields */ }