Struct winit::event::KeyboardInput [−][src]
pub struct KeyboardInput { pub scancode: ScanCode, pub state: ElementState, pub virtual_keycode: Option<VirtualKeyCode>, pub modifiers: ModifiersState, }
Expand description
Describes a keyboard input event.
Fields
scancode: ScanCode
Expand description
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.
state: ElementState
virtual_keycode: Option<VirtualKeyCode>
Expand description
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.”
modifiers: ModifiersState
Deprecated in favor of WindowEvent::ModifiersChanged
Expand description
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
[src]
impl Clone for KeyboardInput
[src]fn clone(&self) -> KeyboardInput
[src]
fn clone(&self) -> KeyboardInput
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for KeyboardInput
[src]
impl Debug for KeyboardInput
[src]impl<'de> Deserialize<'de> for KeyboardInput
[src]
impl<'de> Deserialize<'de> for KeyboardInput
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for KeyboardInput
[src]
impl Hash for KeyboardInput
[src]impl PartialEq<KeyboardInput> for KeyboardInput
[src]
impl PartialEq<KeyboardInput> for KeyboardInput
[src]fn eq(&self, other: &KeyboardInput) -> bool
[src]
fn eq(&self, other: &KeyboardInput) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &KeyboardInput) -> bool
[src]
fn ne(&self, other: &KeyboardInput) -> bool
[src]This method tests for !=
.
impl Serialize for KeyboardInput
[src]
impl Serialize for KeyboardInput
[src]impl Copy for KeyboardInput
[src]
impl Eq for KeyboardInput
[src]
impl StructuralEq for KeyboardInput
[src]
impl StructuralPartialEq for KeyboardInput
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,