Enum roblox::enumeration::KeyCode[][src]

pub enum KeyCode {
Show 254 variants Unknown, Backspace, Tab, Clear, Return, Pause, Escape, Space, QuotedDouble, Hash, Dollar, Percent, Ampersand, Quote, LeftParenthesis, RightParenthesis, Asterisk, Plus, Comma, Minus, Period, Slash, Zero, One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Colon, Semicolon, LessThan, Equals, GreaterThan, Question, At, LeftBracket, BackSlash, RightBracket, Caret, Underscore, Backquote, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, LeftCurly, Pipe, RightCurly, Tilde, Delete, KeypadZero, KeypadOne, KeypadTwo, KeypadThree, KeypadFour, KeypadFive, KeypadSix, KeypadSeven, KeypadEight, KeypadNine, KeypadPeriod, KeypadDivide, KeypadMultiply, KeypadMinus, KeypadPlus, KeypadEnter, KeypadEquals, Up, Down, Right, Left, Insert, Home, End, PageUp, PageDown, LeftShift, RightShift, LeftMeta, RightMeta, LeftAlt, RightAlt, LeftControl, RightControl, CapsLock, NumLock, ScrollLock, LeftSuper, RightSuper, Mode, Compose, Help, Print, SysReq, Break, Menu, Power, Euro, Undo, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, World0, World1, World2, World3, World4, World5, World6, World7, World8, World9, World10, World11, World12, World13, World14, World15, World16, World17, World18, World19, World20, World21, World22, World23, World24, World25, World26, World27, World28, World29, World30, World31, World32, World33, World34, World35, World36, World37, World38, World39, World40, World41, World42, World43, World44, World45, World46, World47, World48, World49, World50, World51, World52, World53, World54, World55, World56, World57, World58, World59, World60, World61, World62, World63, World64, World65, World66, World67, World68, World69, World70, World71, World72, World73, World74, World75, World76, World77, World78, World79, World80, World81, World82, World83, World84, World85, World86, World87, World88, World89, World90, World91, World92, World93, World94, World95, ButtonX, ButtonY, ButtonA, ButtonB, ButtonR1, ButtonL1, ButtonR2, ButtonL2, ButtonR3, ButtonL3, ButtonStart, ButtonSelect, DPadLeft, DPadRight, DPadUp, DPadDown, Thumbstick1, Thumbstick2,
}
Expand description

The KeyCode enumeration.

View Roblox documentation

Examples

Getting an EnumItem’s name:

assert_eq!(roblox::enums::KeyCode::Unknown.name(), "Unknown");

Getting an EnumItem’s value:

assert_eq!(roblox::enums::KeyCode::Unknown.value(), Unknown);

Getting all EnumItems:

let enum_items = roblox::enums::KeyCode::get_enum_items();

Variants

Unknown
Backspace
Tab
Clear
Return
Pause
Escape
Space
QuotedDouble
Hash
Dollar
Percent
Ampersand
Quote
LeftParenthesis
RightParenthesis
Asterisk
Plus
Comma
Minus
Period
Slash
Zero
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Colon
Semicolon
LessThan
Equals
GreaterThan
Question
At
LeftBracket
BackSlash
RightBracket
Caret
Underscore
Backquote
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
LeftCurly
Pipe
RightCurly
Tilde
Delete
KeypadZero
KeypadOne
KeypadTwo
KeypadThree
KeypadFour
KeypadFive
KeypadSix
KeypadSeven
KeypadEight
KeypadNine
KeypadPeriod
KeypadDivide
KeypadMultiply
KeypadMinus
KeypadPlus
KeypadEnter
KeypadEquals
Up
Down
Right
Left
Insert
Home
End
PageUp
PageDown
LeftShift
RightShift
LeftMeta
RightMeta
LeftAlt
RightAlt
LeftControl
RightControl
CapsLock
NumLock
ScrollLock
LeftSuper
RightSuper
Mode
Compose
Help
Print
SysReq
Break
Menu
Power
Euro
Undo
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
World0
World1
World2
World3
World4
World5
World6
World7
World8
World9
World10
World11
World12
World13
World14
World15
World16
World17
World18
World19
World20
World21
World22
World23
World24
World25
World26
World27
World28
World29
World30
World31
World32
World33
World34
World35
World36
World37
World38
World39
World40
World41
World42
World43
World44
World45
World46
World47
World48
World49
World50
World51
World52
World53
World54
World55
World56
World57
World58
World59
World60
World61
World62
World63
World64
World65
World66
World67
World68
World69
World70
World71
World72
World73
World74
World75
World76
World77
World78
World79
World80
World81
World82
World83
World84
World85
World86
World87
World88
World89
World90
World91
World92
World93
World94
World95
ButtonX
ButtonY
ButtonA
ButtonB
ButtonR1
ButtonL1
ButtonR2
ButtonL2
ButtonR3
ButtonL3
ButtonStart
ButtonSelect
DPadLeft
DPadRight
DPadUp
DPadDown
Thumbstick1
Thumbstick2

Implementations

Get the EnumItem’s value.

Get the EnumItem’s value.

Get all of the EnumItems within the Enum.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.