#[non_exhaustive]#[repr(u32)]pub enum Key {
Show 145 variants
Tab = 512,
LeftArrow = 513,
RightArrow = 514,
UpArrow = 515,
DownArrow = 516,
PageUp = 517,
PageDown = 518,
Home = 519,
End = 520,
Insert = 521,
Delete = 522,
Backspace = 523,
Space = 524,
Enter = 525,
Escape = 526,
LeftCtrl = 527,
LeftShift = 528,
LeftAlt = 529,
LeftSuper = 530,
RightCtrl = 531,
RightShift = 532,
RightAlt = 533,
RightSuper = 534,
Menu = 535,
Alpha0 = 536,
Alpha1 = 537,
Alpha2 = 538,
Alpha3 = 539,
Alpha4 = 540,
Alpha5 = 541,
Alpha6 = 542,
Alpha7 = 543,
Alpha8 = 544,
Alpha9 = 545,
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
F1 = 572,
F2 = 573,
F3 = 574,
F4 = 575,
F5 = 576,
F6 = 577,
F7 = 578,
F8 = 579,
F9 = 580,
F10 = 581,
F11 = 582,
F12 = 583,
Apostrophe = 584,
Comma = 585,
Minus = 586,
Period = 587,
Slash = 588,
Semicolon = 589,
Equal = 590,
LeftBracket = 591,
Backslash = 592,
RightBracket = 593,
GraveAccent = 594,
CapsLock = 595,
ScrollLock = 596,
NumLock = 597,
PrintScreen = 598,
Pause = 599,
Keypad0 = 600,
Keypad1 = 601,
Keypad2 = 602,
Keypad3 = 603,
Keypad4 = 604,
Keypad5 = 605,
Keypad6 = 606,
Keypad7 = 607,
Keypad8 = 608,
Keypad9 = 609,
KeypadDecimal = 610,
KeypadDivide = 611,
KeypadMultiply = 612,
KeypadSubtract = 613,
KeypadAdd = 614,
KeypadEnter = 615,
KeypadEqual = 616,
GamepadStart = 617,
GamepadBack = 618,
GamepadFaceLeft = 619,
GamepadFaceRight = 620,
GamepadFaceUp = 621,
GamepadFaceDown = 622,
GamepadDpadLeft = 623,
GamepadDpadRight = 624,
GamepadDpadUp = 625,
GamepadDpadDown = 626,
GamepadL1 = 627,
GamepadR1 = 628,
GamepadL2 = 629,
GamepadR2 = 630,
GamepadL3 = 631,
GamepadR3 = 632,
GamepadLStickLeft = 633,
GamepadLStickRight = 634,
GamepadLStickUp = 635,
GamepadLStickDown = 636,
GamepadRStickLeft = 637,
GamepadRStickRight = 638,
GamepadRStickUp = 639,
GamepadRStickDown = 640,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643,
MouseX1 = 644,
MouseX2 = 645,
MouseWheelX = 646,
MouseWheelY = 647,
ReservedForModCtrl = 648,
ReservedForModShift = 649,
ReservedForModAlt = 650,
ReservedForModSuper = 651,
ModCtrl = 4_096,
ModShift = 8_192,
ModAlt = 16_384,
ModSuper = 32_768,
ModShortcut = 2_048,
}
Expand description
A key identifier
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tab = 512
LeftArrow = 513
RightArrow = 514
UpArrow = 515
DownArrow = 516
PageUp = 517
PageDown = 518
Home = 519
End = 520
Insert = 521
Delete = 522
Backspace = 523
Space = 524
Enter = 525
Escape = 526
LeftCtrl = 527
LeftShift = 528
LeftAlt = 529
LeftSuper = 530
RightCtrl = 531
RightShift = 532
RightAlt = 533
RightSuper = 534
Menu = 535
Alpha0 = 536
Alpha1 = 537
Alpha2 = 538
Alpha3 = 539
Alpha4 = 540
Alpha5 = 541
Alpha6 = 542
Alpha7 = 543
Alpha8 = 544
Alpha9 = 545
A = 546
B = 547
C = 548
D = 549
E = 550
F = 551
G = 552
H = 553
I = 554
J = 555
K = 556
L = 557
M = 558
N = 559
O = 560
P = 561
Q = 562
R = 563
S = 564
T = 565
U = 566
V = 567
W = 568
X = 569
Y = 570
Z = 571
F1 = 572
F2 = 573
F3 = 574
F4 = 575
F5 = 576
F6 = 577
F7 = 578
F8 = 579
F9 = 580
F10 = 581
F11 = 582
F12 = 583
Apostrophe = 584
Comma = 585
Minus = 586
Period = 587
Slash = 588
Semicolon = 589
Equal = 590
LeftBracket = 591
Backslash = 592
RightBracket = 593
GraveAccent = 594
CapsLock = 595
ScrollLock = 596
NumLock = 597
PrintScreen = 598
Pause = 599
Keypad0 = 600
Keypad1 = 601
Keypad2 = 602
Keypad3 = 603
Keypad4 = 604
Keypad5 = 605
Keypad6 = 606
Keypad7 = 607
Keypad8 = 608
Keypad9 = 609
KeypadDecimal = 610
KeypadDivide = 611
KeypadMultiply = 612
KeypadSubtract = 613
KeypadAdd = 614
KeypadEnter = 615
KeypadEqual = 616
GamepadStart = 617
GamepadBack = 618
GamepadFaceLeft = 619
GamepadFaceRight = 620
GamepadFaceUp = 621
GamepadFaceDown = 622
GamepadDpadLeft = 623
GamepadDpadRight = 624
GamepadDpadUp = 625
GamepadDpadDown = 626
GamepadL1 = 627
GamepadR1 = 628
GamepadL2 = 629
GamepadR2 = 630
GamepadL3 = 631
GamepadR3 = 632
GamepadLStickLeft = 633
GamepadLStickRight = 634
GamepadLStickUp = 635
GamepadLStickDown = 636
GamepadRStickLeft = 637
GamepadRStickRight = 638
GamepadRStickUp = 639
GamepadRStickDown = 640
MouseLeft = 641
MouseRight = 642
MouseMiddle = 643
MouseX1 = 644
MouseX2 = 645
MouseWheelX = 646
MouseWheelY = 647
ReservedForModCtrl = 648
ReservedForModShift = 649
ReservedForModAlt = 650
ReservedForModSuper = 651
ModCtrl = 4_096
ModShift = 8_192
ModAlt = 16_384
ModSuper = 32_768
ModShortcut = 2_048
Implementations§
Trait Implementations§
impl Copy for Key
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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
Mutably borrows from an owned value. Read more