Enum imgui::Key

source ·
#[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§

source§

impl Key

source

pub const VARIANTS: [Key; 140] = _

All possible Key variants

source

pub const COUNT: usize = 140usize

Total count of Key variants

Trait Implementations§

source§

impl Clone for Key

source§

fn clone(&self) -> Key

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Key

source§

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

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

impl Hash for Key

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 Index<Key> for Io

§

type Output = u32

The returned type after indexing.
source§

fn index(&self, index: Key) -> &u32

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<Key> for Io

source§

fn index_mut(&mut self, index: Key) -> &mut u32

Performs the mutable indexing (container[index]) operation. Read more
source§

impl PartialEq for Key

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Key

source§

impl Eq for Key

source§

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> 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> 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,

§

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>,

§

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>,

§

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.