fn on_key_down_key<H: Fn() -> bool + 'static>(self, key: Key, handler: H) -> Self {
        self.on_key_down(
            move |_, event| {
                if event.key == key {
                    handler()
                } else {
                    false
                }
            },
        )
    }
/// Handles events triggered by a specific key.
Handles events triggered by a specific key.
Handles events triggered by a specific key .
fn on_key_down_key<H: Fn() -> bool + 'static>(self, key: Key, handler: H) -> Self {
        self.on_key_down(
            move |_, event| {
                if event.key == key {
                    handler()
                } else {
                    false
                }
            },
        )
    }
fn on_key_down_key < H : Fn ( ) -> bool + ' static > ( self , key : Key , handler : H ) -> Self { self . on_key_down ( move | _ , event | { if event . key == key { handler ( ) } else { false } } , ) }
Handles events triggered by a specific key.
Handles events triggered by a specific key .
self
key
Key
handler
H