Key

Enum Key 

Source
#[repr(i32)]
pub enum Key {
Show 107 variants None = 0, 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, Key0 = 536, Key1 = 537, Key2 = 538, Key3 = 539, Key4 = 540, Key5 = 541, Key6 = 542, Key7 = 543, Key8 = 544, Key9 = 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 = 596, Comma = 597, Minus = 598, Period = 599, Slash = 600, Semicolon = 601, Equal = 602, LeftBracket = 603, Backslash = 604, RightBracket = 605, GraveAccent = 606, CapsLock = 607, ScrollLock = 608, NumLock = 609, PrintScreen = 610, Pause = 611, Keypad0 = 612, Keypad1 = 613, Keypad2 = 614, Keypad3 = 615, Keypad4 = 616, Keypad5 = 617, Keypad6 = 618, Keypad7 = 619, Keypad8 = 620, Keypad9 = 621, KeypadDecimal = 622, KeypadDivide = 623, KeypadMultiply = 624, KeypadSubtract = 625, KeypadAdd = 626, KeypadEnter = 627, KeypadEqual = 628, Oem102 = 631,
}
Expand description

Key identifier for keyboard input

Variants§

§

None = 0

No key

§

Tab = 512

Tab key

§

LeftArrow = 513

Left arrow key

§

RightArrow = 514

Right arrow key

§

UpArrow = 515

Up arrow key

§

DownArrow = 516

Down arrow key

§

PageUp = 517

Page up key

§

PageDown = 518

Page down key

§

Home = 519

Home key

§

End = 520

End key

§

Insert = 521

Insert key

§

Delete = 522

Delete key

§

Backspace = 523

Backspace key

§

Space = 524

Space key

§

Enter = 525

Enter key

§

Escape = 526

Escape key

§

LeftCtrl = 527

Left Ctrl key

§

LeftShift = 528

Left Shift key

§

LeftAlt = 529

Left Alt key

§

LeftSuper = 530

Left Super key

§

RightCtrl = 531

Right Ctrl key

§

RightShift = 532

Right Shift key

§

RightAlt = 533

Right Alt key

§

RightSuper = 534

Right Super key

§

Menu = 535

Menu key

§

Key0 = 536

0 key

§

Key1 = 537

1 key

§

Key2 = 538

2 key

§

Key3 = 539

3 key

§

Key4 = 540

4 key

§

Key5 = 541

5 key

§

Key6 = 542

6 key

§

Key7 = 543

7 key

§

Key8 = 544

8 key

§

Key9 = 545

9 key

§

A = 546

A key

§

B = 547

B key

§

C = 548

C key

§

D = 549

D key

§

E = 550

E key

§

F = 551

F key

§

G = 552

G key

§

H = 553

H key

§

I = 554

I key

§

J = 555

J key

§

K = 556

K key

§

L = 557

L key

§

M = 558

M key

§

N = 559

N key

§

O = 560

O key

§

P = 561

P key

§

Q = 562

Q key

§

R = 563

R key

§

S = 564

S key

§

T = 565

T key

§

U = 566

U key

§

V = 567

V key

§

W = 568

W key

§

X = 569

X key

§

Y = 570

Y key

§

Z = 571

Z key

§

F1 = 572

F1 key

§

F2 = 573

F2 key

§

F3 = 574

F3 key

§

F4 = 575

F4 key

§

F5 = 576

F5 key

§

F6 = 577

F6 key

§

F7 = 578

F7 key

§

F8 = 579

F8 key

§

F9 = 580

F9 key

§

F10 = 581

F10 key

§

F11 = 582

F11 key

§

F12 = 583

F12 key

§

Apostrophe = 596

Apostrophe (’) key

§

Comma = 597

Comma (,) key

§

Minus = 598

Minus (-) key

§

Period = 599

Period (.) key

§

Slash = 600

Slash (/) key

§

Semicolon = 601

Semicolon (;) key

§

Equal = 602

Equal (=) key

§

LeftBracket = 603

Left bracket ([) key

§

Backslash = 604

Backslash () key

§

RightBracket = 605

Right bracket (]) key

§

GraveAccent = 606

Grave accent (`) key

§

CapsLock = 607

CapsLock key

§

ScrollLock = 608

ScrollLock key

§

NumLock = 609

NumLock key

§

PrintScreen = 610

PrintScreen key

§

Pause = 611

Pause key

§

Keypad0 = 612

Numpad 0

§

Keypad1 = 613

Numpad 1

§

Keypad2 = 614

Numpad 2

§

Keypad3 = 615

Numpad 3

§

Keypad4 = 616

Numpad 4

§

Keypad5 = 617

Numpad 5

§

Keypad6 = 618

Numpad 6

§

Keypad7 = 619

Numpad 7

§

Keypad8 = 620

Numpad 8

§

Keypad9 = 621

Numpad 9

§

KeypadDecimal = 622

Numpad decimal

§

KeypadDivide = 623

Numpad divide

§

KeypadMultiply = 624

Numpad multiply

§

KeypadSubtract = 625

Numpad subtract

§

KeypadAdd = 626

Numpad add

§

KeypadEnter = 627

Numpad enter

§

KeypadEqual = 628

Numpad equal

§

Oem102 = 631

OEM 102 key (ISO < > |)

Trait Implementations§

Source§

impl Clone for Key

Source§

fn clone(&self) -> Key

Returns a duplicate 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 From<Key> for ImGuiKey

Source§

fn from(value: Key) -> ImGuiKey

Converts to this type from the input type.
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 PartialEq for Key

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more