[][src]Trait orbtk_api::event::KeyDownHandler

pub trait KeyDownHandler: Sized + Widget {
    fn on_key_down<H: Fn(&mut StatesContext<'_>, KeyEvent) -> bool + 'static>(
        self,
        handler: H
    ) -> Self { ... }
fn on_key_down_key<H: Fn() -> bool + 'static>(
        self,
        key: Key,
        handler: H
    ) -> Self { ... } }

Provided methods

fn on_key_down<H: Fn(&mut StatesContext<'_>, KeyEvent) -> bool + 'static>(
    self,
    handler: H
) -> Self

Inserts a handler.

fn on_key_down_key<H: Fn() -> bool + 'static>(
    self,
    key: Key,
    handler: H
) -> Self

Handles events triggered by a specific key.

Loading content...

Implementors

Loading content...