Scripting API

Scripting API

Key

Enum in Abyss.Core, from Abyss.Core.

A key, as AbyssEngine names it.

public enum Key : uint

Remarks

Not Bevy's KeyCode. That enum is #[non_exhaustive] and its discriminants are not a contract anybody promised to keep, so indexing a bitset by them would be an ABI a Bevy upgrade could silently renumber — and the failure would be every key in a game meaning a different key.

These numbers are the ABI, matched value for value by the Rust side. Keys the engine does not name — media keys, international layout keys, F13 upwards — are not reported at all, which is the same outcome as a keyboard that does not have them.

Values

NameValueDescription
A0
B1
C2
D3
E4
F5
G6
H7
I8
J9
K10
L11
M12
N13
O14
P15
Q16
R17
S18
T19
U20
V21
W22
X23
Y24
Z25
Digit026
Digit127
Digit228
Digit329
Digit430
Digit531
Digit632
Digit733
Digit834
Digit935
F136
F237
F338
F439
F540
F641
F742
F843
F944
F1045
F1146
F1247
ArrowLeft48
ArrowRight49
ArrowUp50
ArrowDown51
ShiftLeft52
ShiftRight53
ControlLeft54
ControlRight55
AltLeft56
AltRight57
SuperLeft58
SuperRight59
Space60
Enter61
Escape62
Tab63
Backspace64
Delete65
Insert66
Home67
End68
PageUp69
PageDown70
Minus71
Equal72
BracketLeft73
BracketRight74
Backslash75
Semicolon76
Quote77
Comma78
Period79
Slash80
Backquote81
Numpad082
Numpad183
Numpad284
Numpad385
Numpad486
Numpad587
Numpad688
Numpad789
Numpad890
Numpad991
NumpadAdd92
NumpadSubtract93
NumpadMultiply94
NumpadDivide95
NumpadDecimal96
NumpadEnter97
CapsLock98
NumLock99
ScrollLock100
PrintScreen101
Pause102