Scripting API
Scripting API
Key
Enum in Abyss.Core, from Abyss.Core.
A key, as AbyssEngine names it.
public enum Key : uintRemarks
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
| Name | Value | Description |
|---|---|---|
A | 0 | |
B | 1 | |
C | 2 | |
D | 3 | |
E | 4 | |
F | 5 | |
G | 6 | |
H | 7 | |
I | 8 | |
J | 9 | |
K | 10 | |
L | 11 | |
M | 12 | |
N | 13 | |
O | 14 | |
P | 15 | |
Q | 16 | |
R | 17 | |
S | 18 | |
T | 19 | |
U | 20 | |
V | 21 | |
W | 22 | |
X | 23 | |
Y | 24 | |
Z | 25 | |
Digit0 | 26 | |
Digit1 | 27 | |
Digit2 | 28 | |
Digit3 | 29 | |
Digit4 | 30 | |
Digit5 | 31 | |
Digit6 | 32 | |
Digit7 | 33 | |
Digit8 | 34 | |
Digit9 | 35 | |
F1 | 36 | |
F2 | 37 | |
F3 | 38 | |
F4 | 39 | |
F5 | 40 | |
F6 | 41 | |
F7 | 42 | |
F8 | 43 | |
F9 | 44 | |
F10 | 45 | |
F11 | 46 | |
F12 | 47 | |
ArrowLeft | 48 | |
ArrowRight | 49 | |
ArrowUp | 50 | |
ArrowDown | 51 | |
ShiftLeft | 52 | |
ShiftRight | 53 | |
ControlLeft | 54 | |
ControlRight | 55 | |
AltLeft | 56 | |
AltRight | 57 | |
SuperLeft | 58 | |
SuperRight | 59 | |
Space | 60 | |
Enter | 61 | |
Escape | 62 | |
Tab | 63 | |
Backspace | 64 | |
Delete | 65 | |
Insert | 66 | |
Home | 67 | |
End | 68 | |
PageUp | 69 | |
PageDown | 70 | |
Minus | 71 | |
Equal | 72 | |
BracketLeft | 73 | |
BracketRight | 74 | |
Backslash | 75 | |
Semicolon | 76 | |
Quote | 77 | |
Comma | 78 | |
Period | 79 | |
Slash | 80 | |
Backquote | 81 | |
Numpad0 | 82 | |
Numpad1 | 83 | |
Numpad2 | 84 | |
Numpad3 | 85 | |
Numpad4 | 86 | |
Numpad5 | 87 | |
Numpad6 | 88 | |
Numpad7 | 89 | |
Numpad8 | 90 | |
Numpad9 | 91 | |
NumpadAdd | 92 | |
NumpadSubtract | 93 | |
NumpadMultiply | 94 | |
NumpadDivide | 95 | |
NumpadDecimal | 96 | |
NumpadEnter | 97 | |
CapsLock | 98 | |
NumLock | 99 | |
ScrollLock | 100 | |
PrintScreen | 101 | |
Pause | 102 |
