Enum winit::keyboard::KeyLocation
source · pub enum KeyLocation {
Standard,
Left,
Right,
Numpad,
}
Expand description
The location of the key on the keyboard.
Certain physical keys on the keyboard can have the same value, but are in different locations. For instance, the Shift key can be on the left or right side of the keyboard, or the number keys can be above the letters or on the numpad. This enum allows the user to differentiate them.
See the documentation for the location
field on the KeyEvent
struct for more information.
Variants§
Standard
The key is in its “normal” location on the keyboard.
For instance, the “1” key above the “Q” key on a QWERTY keyboard will use this location. This invariant is also returned when the location of the key cannot be identified.
For image attribution, see the ATTRIBUTION.md file.Left
The key is on the left side of the keyboard.
For instance, the left Shift key below the Caps Lock key on a QWERTY keyboard will use this location.
For image attribution, see the ATTRIBUTION.md file.Right
The key is on the right side of the keyboard.
For instance, the right Shift key below the Enter key on a QWERTY keyboard will use this location.
For image attribution, see the ATTRIBUTION.md file.Numpad
The key is on the numpad.
For instance, the “1” key on the numpad will use this location.
For image attribution, see the ATTRIBUTION.md file.Trait Implementations§
source§impl Clone for KeyLocation
impl Clone for KeyLocation
source§fn clone(&self) -> KeyLocation
fn clone(&self) -> KeyLocation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyLocation
impl Debug for KeyLocation
source§impl Hash for KeyLocation
impl Hash for KeyLocation
source§impl PartialEq for KeyLocation
impl PartialEq for KeyLocation
source§fn eq(&self, other: &KeyLocation) -> bool
fn eq(&self, other: &KeyLocation) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for KeyLocation
impl Eq for KeyLocation
impl StructuralPartialEq for KeyLocation
Auto Trait Implementations§
impl Freeze for KeyLocation
impl RefUnwindSafe for KeyLocation
impl Send for KeyLocation
impl Sync for KeyLocation
impl Unpin for KeyLocation
impl UnwindSafe for KeyLocation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.