Skip to main content

KeyHandler

Trait KeyHandler 

Source
pub trait KeyHandler: Send + Sync {
    // Required method
    fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        app: &'life1 AppHandle,
        dispatcher: &'life2 AppActionDispatcher,
        key: &'life3 KeyEvent,
        term_width: u16,
        term_height: u16,
        last_input_layout_update: Option<Instant>,
    ) -> Pin<Box<dyn Future<Output = KeyResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Trait for keybinding handlers

Required Methods§

Source

fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, app: &'life1 AppHandle, dispatcher: &'life2 AppActionDispatcher, key: &'life3 KeyEvent, term_width: u16, term_height: u16, last_input_layout_update: Option<Instant>, ) -> Pin<Box<dyn Future<Output = KeyResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Handle a key event

Implementors§