KeyboardKeyEvent

Trait KeyboardKeyEvent 

Source
pub trait KeyboardKeyEvent<B: InputBackend>: Event<B> {
    // Required methods
    fn key_code(&self) -> Keycode;
    fn state(&self) -> KeyState;
    fn count(&self) -> u32;
}
Expand description

Trait for keyboard event

Required Methods§

Source

fn key_code(&self) -> Keycode

Returns the numerical button code of the keyboard button.

The value will correspond to one KEY_ constants from the Linux input event codes inside input-event-codes.h.

Source

fn state(&self) -> KeyState

State of the key

Source

fn count(&self) -> u32

Total number of keys pressed on all devices on the associated Seat

Implementations on Foreign Types§

Source§

impl KeyboardKeyEvent<LibinputInputBackend> for KeyboardKeyEvent

Available on crate feature backend_libinput only.
Source§

fn key_code(&self) -> Keycode

Source§

fn state(&self) -> KeyState

Source§

fn count(&self) -> u32

Implementors§

Source§

impl KeyboardKeyEvent<WinitInput> for WinitKeyboardInputEvent

Available on crate feature backend_winit only.
Source§

impl KeyboardKeyEvent<X11Input> for X11KeyboardInputEvent

Available on crate feature backend_x11 only.
Source§

impl<B: InputBackend> KeyboardKeyEvent<B> for UnusedEvent