Struct show_image::event::KeyboardInput [−][src]
pub struct KeyboardInput {
pub scan_code: ScanCode,
pub key_code: Option<VirtualKeyCode>,
pub state: ElementState,
pub modifiers: ModifiersState,
}
Expand description
Keyboard input.
Fields
scan_code: ScanCode
Scan code of the physical key.
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.
key_code: Option<VirtualKeyCode>
Virtual key code indentifying the semantic meaning of the key.
Use this 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”.
state: ElementState
State of the key (pressed or released).
modifiers: ModifiersState
Keyboard modifiers that were active at the time of the event.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for KeyboardInput
impl Send for KeyboardInput
impl Sync for KeyboardInput
impl Unpin for KeyboardInput
impl UnwindSafe for KeyboardInput
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
Compare self to key
and return true
if they are equal.