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 more