Struct nannou::ui::backend::glium::glium::backend::glutin::glutin::KeyboardInput[]

pub struct KeyboardInput {
    pub scancode: u32,
    pub state: ElementState,
    pub virtual_keycode: Option<VirtualKeyCode>,
    pub modifiers: ModifiersState,
}

Describes a keyboard input event.

Fields

Identifies the physical key pressed

This should not change if the user adjusts the host's keyboard map. Use when the physical location of the key is more important than the key's host GUI semantics, such as for movement controls in a first-person game.

Identifies the semantic meaning of the key

Use when the semantics of the key are more important than the physical location of the key, such as when implementing appropriate behavior for "page up."

Modifier keys active at the time of this input.

This is tracked internally to avoid tracking errors arising from modifier key state changes when events from this device are not being delivered to the application, e.g. due to keyboard focus being elsewhere.

Trait Implementations

impl Clone for KeyboardInput

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for KeyboardInput

Formats the value using the given formatter. Read more

impl Copy for KeyboardInput

Auto Trait Implementations