Skip to main content

KeyboardKey

Enum KeyboardKey 

Source
#[repr(i32)]
pub enum KeyboardKey {
Show 110 variants KeyNull = 0, KeyApostrophe = 39, KeyComma = 44, KeyMinus = 45, KeyPeriod = 46, KeySlash = 47, KeyZero = 48, KeyOne = 49, KeyTwo = 50, KeyThree = 51, KeyFour = 52, KeyFive = 53, KeySix = 54, KeySeven = 55, KeyEight = 56, KeyNine = 57, KeySemicolon = 59, KeyEqual = 61, KeyA = 65, KeyB = 66, KeyC = 67, KeyD = 68, KeyE = 69, KeyF = 70, KeyG = 71, KeyH = 72, KeyI = 73, KeyJ = 74, KeyK = 75, KeyL = 76, KeyM = 77, KeyN = 78, KeyO = 79, KeyP = 80, KeyQ = 81, KeyR = 82, KeyS = 83, KeyT = 84, KeyU = 85, KeyV = 86, KeyW = 87, KeyX = 88, KeyY = 89, KeyZ = 90, KeyLeftBracket = 91, KeyBackslash = 92, KeyRightBracket = 93, KeyGrave = 96, KeySpace = 32, KeyEscape = 256, KeyEnter = 257, KeyTab = 258, KeyBackspace = 259, KeyInsert = 260, KeyDelete = 261, KeyRight = 262, KeyLeft = 263, KeyDown = 264, KeyUp = 265, KeyPageUp = 266, KeyPageDown = 267, KeyHome = 268, KeyEnd = 269, KeyCapsLock = 280, KeyScrollLock = 281, KeyNumLock = 282, KeyPrintScreen = 283, KeyPause = 284, KeyF1 = 290, KeyF2 = 291, KeyF3 = 292, KeyF4 = 293, KeyF5 = 294, KeyF6 = 295, KeyF7 = 296, KeyF8 = 297, KeyF9 = 298, KeyF10 = 299, KeyF11 = 300, KeyF12 = 301, KeyLeftShift = 340, KeyLeftControl = 341, KeyLeftAlt = 342, KeyLeftSuper = 343, KeyRightShift = 344, KeyRightControl = 345, KeyRightAlt = 346, KeyRightSuper = 347, KeyKbMenu = 348, KeyKp0 = 320, KeyKp1 = 321, KeyKp2 = 322, KeyKp3 = 323, KeyKp4 = 324, KeyKp5 = 325, KeyKp6 = 326, KeyKp7 = 327, KeyKp8 = 328, KeyKp9 = 329, KeyKpDecimal = 330, KeyKpDivide = 331, KeyKpMultiply = 332, KeyKpSubtract = 333, KeyKpAdd = 334, KeyKpEnter = 335, KeyKpEqual = 336, KeyBack = 4, KeyMenu = 5, KeyVolumeUp = 24, KeyVolumeDown = 25,
}
Expand description

Normalized keyboard key identifiers used by Cotis input providers.

Values intentionally match platform/backend key tables used by Cotis integrations (GLFW/raylib style codes, plus Android keys).

Variants§

§

KeyNull = 0

§

KeyApostrophe = 39

§

KeyComma = 44

§

KeyMinus = 45

§

KeyPeriod = 46

§

KeySlash = 47

§

KeyZero = 48

§

KeyOne = 49

§

KeyTwo = 50

§

KeyThree = 51

§

KeyFour = 52

§

KeyFive = 53

§

KeySix = 54

§

KeySeven = 55

§

KeyEight = 56

§

KeyNine = 57

§

KeySemicolon = 59

§

KeyEqual = 61

§

KeyA = 65

§

KeyB = 66

§

KeyC = 67

§

KeyD = 68

§

KeyE = 69

§

KeyF = 70

§

KeyG = 71

§

KeyH = 72

§

KeyI = 73

§

KeyJ = 74

§

KeyK = 75

§

KeyL = 76

§

KeyM = 77

§

KeyN = 78

§

KeyO = 79

§

KeyP = 80

§

KeyQ = 81

§

KeyR = 82

§

KeyS = 83

§

KeyT = 84

§

KeyU = 85

§

KeyV = 86

§

KeyW = 87

§

KeyX = 88

§

KeyY = 89

§

KeyZ = 90

§

KeyLeftBracket = 91

§

KeyBackslash = 92

§

KeyRightBracket = 93

§

KeyGrave = 96

§

KeySpace = 32

§

KeyEscape = 256

§

KeyEnter = 257

§

KeyTab = 258

§

KeyBackspace = 259

§

KeyInsert = 260

§

KeyDelete = 261

§

KeyRight = 262

§

KeyLeft = 263

§

KeyDown = 264

§

KeyUp = 265

§

KeyPageUp = 266

§

KeyPageDown = 267

§

KeyHome = 268

§

KeyEnd = 269

§

KeyCapsLock = 280

§

KeyScrollLock = 281

§

KeyNumLock = 282

§

KeyPrintScreen = 283

§

KeyPause = 284

§

KeyF1 = 290

§

KeyF2 = 291

§

KeyF3 = 292

§

KeyF4 = 293

§

KeyF5 = 294

§

KeyF6 = 295

§

KeyF7 = 296

§

KeyF8 = 297

§

KeyF9 = 298

§

KeyF10 = 299

§

KeyF11 = 300

§

KeyF12 = 301

§

KeyLeftShift = 340

§

KeyLeftControl = 341

§

KeyLeftAlt = 342

§

KeyLeftSuper = 343

§

KeyRightShift = 344

§

KeyRightControl = 345

§

KeyRightAlt = 346

§

KeyRightSuper = 347

§

KeyKbMenu = 348

§

KeyKp0 = 320

§

KeyKp1 = 321

§

KeyKp2 = 322

§

KeyKp3 = 323

§

KeyKp4 = 324

§

KeyKp5 = 325

§

KeyKp6 = 326

§

KeyKp7 = 327

§

KeyKp8 = 328

§

KeyKp9 = 329

§

KeyKpDecimal = 330

§

KeyKpDivide = 331

§

KeyKpMultiply = 332

§

KeyKpSubtract = 333

§

KeyKpAdd = 334

§

KeyKpEnter = 335

§

KeyKpEqual = 336

§

KeyBack = 4

§

KeyMenu = 5

§

KeyVolumeUp = 24

§

KeyVolumeDown = 25

Trait Implementations§

Source§

impl Clone for KeyboardKey

Source§

fn clone(&self) -> KeyboardKey

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for KeyboardKey

Source§

impl Debug for KeyboardKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for KeyboardKey

Source§

impl Hash for KeyboardKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for KeyboardKey

Source§

fn eq(&self, other: &KeyboardKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for KeyboardKey

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.