Type:Key: Difference between revisions

From Resonite Wiki
m messed up category
Give the whole thing real descriptions
Line 1: Line 1:
A key enum is used to represent the many different keys a keyboard may have. Most of these keys are from an American keyboard.
The '''Key''' [[Enum]] is used to represent the many different keys a keyboard may have. Keys described here map to ''positions'' on a US keyboard layout. For example, the "A" key is always located to the right of Caps Lock, which a user of a French AZERTY keyboard would instead see as the "Q" key.
 
Note that many values are unused internally, and will therefore never be detected as "pressed".


= Possible Values =
= Possible Values =
{| class="wikitable"
{{Table EnumValues
! Value
|None|0|Represe
! Description
|Backspace|8|The {{Kbd|← backspace}} key.
! Numeric Value
|Tab|9|The tab key.
|-
|Clear|12|This value appears to be unused internally.
|None
|Return|13|The {{Kbd|return ↵}} key, sometimes also called "enter".
|Null key
|Pause|19|The {{Kbd|pause}} key.
|0
|Escape|27|The escape or "{{Kbd|Esc}}" key.
|-
|Space|32|The space bar.
|Backspace
|Exclaim|33|This value appears to be unused internally.
|Backspace Key on the keyboard
|DoubleQuote|34|This value appears to be unused internally.
|8
|Hash|35|This value appears to be unused internally.
|-
|Dollar|36|This value appears to be unused internally.
|Tab
|Ampersand|38|This value appears to be unused internally.
|Tab Key on the keyboard
|Quote|39|This value appears to be unused internally.
|9
|LeftParenthesis|40|This value appears to be unused internally.
|-
|RightParenthesis|41|This value appears to be unused internally.
|Clear
|Asterisk|42|This value appears to be unused internally.
|Clear Key on the keyboard
|Plus|43|This value appears to be unused internally.
|12
|Comma|44|The comma or "{{Kbd|,}}" key.
|-
|Minus|45|The minus or "{{Kbd|-}}" key.
|Return
|Period|46|The period or "{{Kbd|.}}" key.
|Return Key on the keyboard
|Slash|47|The forward slash or "{{Kbd|/}}" key.
|13
|Alpha0|48|The "{{Kbd|0}}" key on the number row.
|-
|Alpha1|49|The "{{Kbd|1}}" key on the number row.
|Pause
|Alpha2|50|The "{{Kbd|2}}" key on the number row.
|Pause Key on the keyboard
|Alpha3|51|The "{{Kbd|3}}" key on the number row.
|19
|Alpha4|52|The "{{Kbd|4}}" key on the number row.
|-
|Alpha5|53|The "{{Kbd|5}}" key on the number row.
|Escape
|Alpha6|54|The "{{Kbd|6}}" key on the number row.
|Escape Key on the keyboard
|Alpha7|55|The "{{Kbd|7}}" key on the number row.
|27
|Alpha8|56|The "{{Kbd|8}}" key on the number row.
|-
|Alpha9|57|The "{{Kbd|9}}" key on the number row.
|Space
|Colon|58|This value appears to be unused internally.
|Space Key on the keyboard
|Semicolon|59|The semicolon or "{{Kbd|;}}" key.
|32
|Less|60|This value appears to be unused internally.
|-
|Equals|61|The equals or "{{Kbd|=}}" key.
|Exclaim
|Greater|62|This value appears to be unused internally.
|Exclaim Key on the keyboard
|Question|63|This value appears to be unused internally.
|33
|At|64|This value appears to be unused internally.
|-
|VerticalBar|65|This value appears to be unused internally.
|DoubleQuote
|LeftBracket|91|The left bracket or "{{Kbd|[}}" key.
|DoubleQuote Key on the keyboard
|Backslash|92|The backslash or "{{Kbd|\}}" key.
|34
|RightBracket|93|The left bracket or "{{Kbd|]}}" key.
|-
|Caret|94|This value appears to be unused internally.
|Hash
|Underscore|95|This value appears to be unused internally.
|Hash Key on the keyboard
|BackQuote|96|The backquote, backtick, grave, or "{{Kbd|`}}" key.
|35
|A|97|The "{{Kbd|A}}" key.
|-
|B|98|The "{{Kbd|B}}" key.
|Dollar
|C|99|The "{{Kbd|C}}" key.
|Dollar Key on the keyboard
|D|100|The "{{Kbd|D}}" key.
|36
|E|101|The "{{Kbd|E}}" key.
|-
|F|102|The "{{Kbd|F}}" key.
|Ampersand
|G|103|The "{{Kbd|G}}" key.
|Ampersand Key on the keyboard
|H|104|The "{{Kbd|H}}" key.
|38
|I|105|The "{{Kbd|I}}" key.
|-
|J|106|The "{{Kbd|J}}" key.
|Quote
|K|107|The "{{Kbd|K}}" key.
|Quote Key on the keyboard
|L|108|The "{{Kbd|L}}" key.
|39
|M|109|The "{{Kbd|M}}" key.
|-
|N|110|The "{{Kbd|N}}" key.
|LeftParenthesis
|O|111|The "{{Kbd|O}}" key.
|LeftParenthesis Key on the keyboard
|P|112|The "{{Kbd|P}}" key.
|40
|Q|113|The "{{Kbd|Q}}" key.
|-
|R|114|The "{{Kbd|R}}" key.
|RightParenthesis
|S|115|The "{{Kbd|S}}" key.
|RightParenthesis Key on the keyboard
|T|116|The "{{Kbd|T}}" key.
|41
|U|117|The "{{Kbd|U}}" key.
|-
|V|118|The "{{Kbd|V}}" key.
|Asterisk
|W|119|The "{{Kbd|W}}" key.
|Asterisk Key on the keyboard
|X|120|The "{{Kbd|X}}" key.
|42
|Y|121|The "{{Kbd|Y}}" key.
|-
|Z|122|The "{{Kbd|Z}}" key.
|Plus
|Percent|123|This value appears to be unused internally.
|Plus Key on the keyboard
|Tilde|124|This value appears to be unused internally.
|43
|LeftBrace|125|This value appears to be unused internally.
|-
|RightBrace|126|This value appears to be unused internally.
|Comma
|Delete|127|The delete or "{{Kbd|del}}" key.
|Comma Key on the keyboard
|Keypad0|256|The "{{Kbd|0}}" key on the number or keypad.
|44
|Keypad1|257|The "{{Kbd|1}}" key on the number or keypad.
|-
|Keypad2|258|The "{{Kbd|2}}" key on the number or keypad.
|Minus
|Keypad3|259|The "{{Kbd|3}}" key on the number or keypad.
|Minus Key on the keyboard
|Keypad4|260|The "{{Kbd|4}}" key on the number or keypad.
|45
|Keypad5|261|The "{{Kbd|5}}" key on the number or keypad.
|-
|Keypad6|262|The "{{Kbd|6}}" key on the number or keypad.
|Period
|Keypad7|263|The "{{Kbd|7}}" key on the number or keypad.
|Period Key on the keyboard
|Keypad8|264|The "{{Kbd|8}}" key on the number or keypad.
|46
|Keypad9|265|The "{{Kbd|9}}" key on the number or keypad.
|-
|KeypadPeriod|266|The period or "{{Kbd|.}}" key on the number or keypad.
|Slash
|KeypadDivide|267|The division key or "{{Kbd|/}}" on the number or keypad.
|Slash Key on the keyboard
|KeypadMultiply|268|The multiplication or "{{Kbd|*}}" key on the number or keypad.
|47
|KeypadMinus|269|The minus or "{{Kbd|-}}" key on the number or keypad.
|-
|KeypadPlus|270|The plus or "{{Kbd|+}}" key on the number or keypad.
|Alpha0
|KeypadEnter|271|The "{{Kbd|enter}}" key on the number or keypad.
|Alpha0 Key on the keyboard
|KeypadEquals|272|The equals or "{{Kbd|=}}" key on the number or keypad. Not all keyboards have this key, even if they have a number pad.
|48
|UpArrow|273|The up arrow key.
|-
|DownArrow|274|The down arrow key.
|Alpha1
|RightArrow|275|The right arrow key.
|Alpha1 Key on the keyboard
|LeftArrow|276|The left arrow key.
|49
|Insert|277|The {{Kbd|insert}} or "{{Kbd|ins}}" key.
|-
|Home|278|The {{Kbd|home}} key.
|Alpha2
|End|279|The {{Kbd|end}} key.
|Alpha2 Key on the keyboard
|PageUp|280|The {{Kbd|Page Up}} or "{{Kbd|PgUp}}" key.
|50
|PageDown|281|The {{Kbd|Page Down}} or "{{Kbd|PgDown}}" key.
|-
|F1|282|The {{Kbd|F1}} key.
|Alpha3
|F2|283|The {{Kbd|F2}} key.
|Alpha3 Key on the keyboard
|F3|284|The {{Kbd|F3}} key.
|51
|F4|285|The {{Kbd|F4}} key.
|-
|F5|286|The {{Kbd|F5}} key.
|Alpha4
|F6|287|The {{Kbd|F6}} key.
|Alpha4 Key on the keyboard
|F7|288|The {{Kbd|F7}} key.
|52
|F8|289|The {{Kbd|F8}} key.
|-
|F9|290|The {{Kbd|F9}} key.
|Alpha5
|F10|291|The {{Kbd|F10}} key.
|Alpha5 Key on the keyboard
|F11|292|The {{Kbd|F11}} key.
|53
|F12|293|The {{Kbd|F12}} key.
|-
|F13|294|The {{Kbd|F13}} key.
|Alpha6
|F14|295|The {{Kbd|F14}} key.
|Alpha6 Key on the keyboard
|F15|296|The {{Kbd|F15}} key.
|54
|Numlock|300|The {{Kbd|Num Lock}} key.
|-
|CapsLock|301|The {{Kbd|Caps Lock}} key.
|Alpha7
|ScrollLock|302|The {{Kbd|Scroll Lock}} key.
|Alpha7 Key on the keyboard
|RightShift|303|The right {{Kbd|Shift}} key.
|55
|LeftShift|304|The left {{Kbd|Shift}} key.
|-
|RightControl|305|The right control or "{{Kbd|Ctrl}}" key.
|Alpha8
|LeftControl|306|The left control or "{{Kbd|Ctrl}}" key.
|Alpha8 Key on the keyboard
|RightAlt|307|The right {{Kbd|Alt}} or {{Kbd|⌥ Option}} key.
|56
|LeftAlt|308|The left {{Kbd|Alt}} or {{Kbd|⌥ Option}} key.
|-
|RightApple|309|This value appears to be unused internally.
|Alpha9
|RightCommand|309|This value appears to be unused internally.
|Alpha9 Key on the keyboard
|LeftApple|310|This value appears to be unused internally.
|57
|LeftCommand|310|This value appears to be unused internally.
|-
|LeftWindows|311|The left Windows, "Meta" or {{Kbd|⌘ Command}} key.
|Colon
|RightWindows|312|The right Windows, "Meta" or {{Kbd|⌘ Command}} key.
|Colon Key on the keyboard
|AltGr|313|The same key as <code>RightAlt</code>.
|58
|Help|315|This value appears to be unused internally.
|-
|Print|316|The {{Kbd|Print Screen}} key.
|Semicolon
|SysReq|317|This value appears to be unused internally.
|Semicolon Key on the keyboard
|Break|318|This value appears to be unused internally.
|59
|Menu|319|This value appears to be unused internally.
|-
|Shift|512|Either <code>LeftShift</code> or <code>RightShift</code>.
|Less
|Control|513|Either <code>LeftControl</code> or <code>RightControl</code>.
|Less Key on the keyboard
|Alt|514|Either <code>LeftAlt</code> or <code>RightAlt</code>.
|60
|Windows|515|Either <code>LeftWindows</code> or <code>RightWindows</code>.
|-
}}
|Equals
|Equals Key on the keyboard
|61
|-
|Greater
|Greater Key on the keyboard
|62
|-
|Question
|Question Key on the keyboard
|63
|-
|At
|At Key on the keyboard
|64
|-
|VerticalBar
|VerticalBar Key on the keyboard
|65
|-
|LeftBracket
|LeftBracket Key on the keyboard
|91
|-
|Backslash
|Backslash Key on the keyboard
|92
|-
|RightBracket
|RightBracket Key on the keyboard
|93
|-
|Caret
|Caret Key on the keyboard
|94
|-
|Underscore
|Underscore Key on the keyboard
|95
|-
|BackQuote
|BackQuote Key on the keyboard
|96
|-
|A
|A Key on the keyboard
|97
|-
|B
|B Key on the keyboard
|98
|-
|C
|C Key on the keyboard
|99
|-
|D
|D Key on the keyboard
|100
|-
|E
|E Key on the keyboard
|101
|-
|F
|F Key on the keyboard
|102
|-
|G
|G Key on the keyboard
|103
|-
|H
|H Key on the keyboard
|104
|-
|I
|I Key on the keyboard
|105
|-
|J
|J Key on the keyboard
|106
|-
|K
|K Key on the keyboard
|107
|-
|L
|L Key on the keyboard
|108
|-
|M
|M Key on the keyboard
|109
|-
|N
|N Key on the keyboard
|110
|-
|O
|O Key on the keyboard
|111
|-
|P
|P Key on the keyboard
|112
|-
|Q
|Q Key on the keyboard
|113
|-
|R
|R Key on the keyboard
|114
|-
|S
|S Key on the keyboard
|115
|-
|T
|T Key on the keyboard
|116
|-
|U
|U Key on the keyboard
|117
|-
|V
|V Key on the keyboard
|118
|-
|W
|W Key on the keyboard
|119
|-
|X
|X Key on the keyboard
|120
|-
|Y
|Y Key on the keyboard
|121
|-
|Z
|Z Key on the keyboard
|122
|-
|Percent
|Percent Key on the keyboard
|123
|-
|Tilde
|Tilde Key on the keyboard
|124
|-
|LeftBrace
|LeftBrace Key on the keyboard
|125
|-
|RightBrace
|RightBrace Key on the keyboard
|126
|-
|Delete
|Delete Key on the keyboard
|127
|-
|Keypad0
|Keypad0 Key on the keyboard
|256
|-
|Keypad1
|Keypad1 Key on the keyboard
|257
|-
|Keypad2
|Keypad2 Key on the keyboard
|258
|-
|Keypad3
|Keypad3 Key on the keyboard
|259
|-
|Keypad4
|Keypad4 Key on the keyboard
|260
|-
|Keypad5
|Keypad5 Key on the keyboard
|261
|-
|Keypad6
|Keypad6 Key on the keyboard
|262
|-
|Keypad7
|Keypad7 Key on the keyboard
|263
|-
|Keypad8
|Keypad8 Key on the keyboard
|264
|-
|Keypad9
|Keypad9 Key on the keyboard
|265
|-
|KeypadPeriod
|KeypadPeriod Key on the keyboard
|266
|-
|KeypadDivide
|KeypadDivide Key on the keyboard
|267
|-
|KeypadMultiply
|KeypadMultiply Key on the keyboard
|268
|-
|KeypadMinus
|KeypadMinus Key on the keyboard
|269
|-
|KeypadPlus
|KeypadPlus Key on the keyboard
|270
|-
|KeypadEnter
|KeypadEnter Key on the keyboard
|271
|-
|KeypadEquals
|KeypadEquals Key on the keyboard
|272
|-
|UpArrow
|UpArrow Key on the keyboard
|273
|-
|DownArrow
|DownArrow Key on the keyboard
|274
|-
|RightArrow
|RightArrow Key on the keyboard
|275
|-
|LeftArrow
|LeftArrow Key on the keyboard
|276
|-
|Insert
|Insert Key on the keyboard
|277
|-
|Home
|Home Key on the keyboard
|278
|-
|End
|End Key on the keyboard
|279
|-
|PageUp
|PageUp Key on the keyboard
|280
|-
|PageDown
|PageDown Key on the keyboard
|281
|-
|F1
|F1 Key on the keyboard
|282
|-
|F2
|F2 Key on the keyboard
|283
|-
|F3
|F3 Key on the keyboard
|284
|-
|F4
|F4 Key on the keyboard
|285
|-
|F5
|F5 Key on the keyboard
|286
|-
|F6
|F6 Key on the keyboard
|287
|-
|F7
|F7 Key on the keyboard
|288
|-
|F8
|F8 Key on the keyboard
|289
|-
|F9
|F9 Key on the keyboard
|290
|-
|F10
|F10 Key on the keyboard
|291
|-
|F11
|F11 Key on the keyboard
|292
|-
|F12
|F12 Key on the keyboard
|293
|-
|F13
|F13 Key on the keyboard
|294
|-
|F14
|F14 Key on the keyboard
|295
|-
|F15
|F15 Key on the keyboard
|296
|-
|Numlock
|Numlock Key on the keyboard
|300
|-
|CapsLock
|CapsLock Key on the keyboard
|301
|-
|ScrollLock
|ScrollLock Key on the keyboard
|302
|-
|RightShift
|RightShift Key on the keyboard
|303
|-
|LeftShift
|LeftShift Key on the keyboard
|304
|-
|RightControl
|RightControl Key on the keyboard
|305
|-
|LeftControl
|LeftControl Key on the keyboard
|306
|-
|RightAlt
|RightAlt Key on the keyboard
|307
|-
|LeftAlt
|LeftAlt Key on the keyboard
|308
|-
|RightApple
|RightApple Key on the keyboard
|309
|-
|LeftApple
|LeftApple Key on the keyboard
|310
|-
|LeftWindows
|LeftWindows Key on the keyboard
|311
|-
|RightWindows
|RightWindows Key on the keyboard
|312
|-
|AltGr
|AltGr Key on the keyboard
|313
|-
|Help
|Help Key on the keyboard
|315
|-
|Print
|Print Key on the keyboard
|316
|-
|SysReq
|SysReq Key on the keyboard
|317
|-
|Break
|Break Key on the keyboard
|318
|-
|Menu
|Menu Key on the keyboard
|319
|-
|Shift
|Shift Key on the keyboard
|512
|-
|Control
|Control Key on the keyboard
|513
|-
|Alt
|Alt Key on the keyboard
|514
|-
|Windows
|Windows Key on the keyboard
|515
|-
|}
 
 






[[Category:Enums]] [[Category:Type]]
[[Category:Enums]] [[Category:Type]]

Revision as of 04:19, 4 March 2024

The Key Enum is used to represent the many different keys a keyboard may have. Keys described here map to positions on a US keyboard layout. For example, the "A" key is always located to the right of Caps Lock, which a user of a French AZERTY keyboard would instead see as the "Q" key.

Note that many values are unused internally, and will therefore never be detected as "pressed".

Possible Values

Values
Name Value Description
None 0 Represe
Backspace 8 The ← backspace key.
Tab 9 The tab key.
Clear 12 This value appears to be unused internally.
Return 13 The return ↵ key, sometimes also called "enter".
Pause 19 The pause key.
Escape 27 The escape or "Esc" key.
Space 32 The space bar.
Exclaim 33 This value appears to be unused internally.
DoubleQuote 34 This value appears to be unused internally.
Hash 35 This value appears to be unused internally.
Dollar 36 This value appears to be unused internally.
Ampersand 38 This value appears to be unused internally.
Quote 39 This value appears to be unused internally.
LeftParenthesis 40 This value appears to be unused internally.
RightParenthesis 41 This value appears to be unused internally.
Asterisk 42 This value appears to be unused internally.
Plus 43 This value appears to be unused internally.
Comma 44 The comma or "," key.
Minus 45 The minus or "-" key.
Period 46 The period or "." key.
Slash 47 The forward slash or "/" key.
Alpha0 48 The "0" key on the number row.
Alpha1 49 The "1" key on the number row.
Alpha2 50 The "2" key on the number row.
Alpha3 51 The "3" key on the number row.
Alpha4 52 The "4" key on the number row.
Alpha5 53 The "5" key on the number row.
Alpha6 54 The "6" key on the number row.
Alpha7 55 The "7" key on the number row.
Alpha8 56 The "8" key on the number row.
Alpha9 57 The "9" key on the number row.
Colon 58 This value appears to be unused internally.
Semicolon 59 The semicolon or ";" key.
Less 60 This value appears to be unused internally.
Equals 61 The equals or "=" key.
Greater 62 This value appears to be unused internally.
Question 63 This value appears to be unused internally.
At 64 This value appears to be unused internally.
VerticalBar 65 This value appears to be unused internally.
LeftBracket 91 The left bracket or "[" key.
Backslash 92 The backslash or "\" key.
RightBracket 93 The left bracket or "]" key.
Caret 94 This value appears to be unused internally.
Underscore 95 This value appears to be unused internally.
BackQuote 96 The backquote, backtick, grave, or "`" key.
A 97 The "A" key.
B 98 The "B" key.
C 99 The "C" key.
D 100 The "D" key.
E 101 The "E" key.
F 102 The "F" key.
G 103 The "G" key.
H 104 The "H" key.
I 105 The "I" key.
J 106 The "J" key.
K 107 The "K" key.
L 108 The "L" key.
M 109 The "M" key.
N 110 The "N" key.
O 111 The "O" key.
P 112 The "P" key.
Q 113 The "Q" key.
R 114 The "R" key.
S 115 The "S" key.
T 116 The "T" key.
U 117 The "U" key.
V 118 The "V" key.
W 119 The "W" key.
X 120 The "X" key.
Y 121 The "Y" key.
Z 122 The "Z" key.
Percent 123 This value appears to be unused internally.
Tilde 124 This value appears to be unused internally.
LeftBrace 125 This value appears to be unused internally.
RightBrace 126 This value appears to be unused internally.
Delete 127 The delete or "del" key.
Keypad0 256 The "0" key on the number or keypad.
Keypad1 257 The "1" key on the number or keypad.
Keypad2 258 The "2" key on the number or keypad.
Keypad3 259 The "3" key on the number or keypad.
Keypad4 260 The "4" key on the number or keypad.
Keypad5 261 The "5" key on the number or keypad.
Keypad6 262 The "6" key on the number or keypad.
Keypad7 263 The "7" key on the number or keypad.
Keypad8 264 The "8" key on the number or keypad.
Keypad9 265 The "9" key on the number or keypad.
KeypadPeriod 266 The period or "." key on the number or keypad.
KeypadDivide 267 The division key or "/" on the number or keypad.
KeypadMultiply 268 The multiplication or "*" key on the number or keypad.
KeypadMinus 269 The minus or "-" key on the number or keypad.
KeypadPlus 270 The plus or "+" key on the number or keypad.
KeypadEnter 271 The "enter" key on the number or keypad.
KeypadEquals 272 The equals or "=" key on the number or keypad. Not all keyboards have this key, even if they have a number pad.
UpArrow 273 The up arrow key.
DownArrow 274 The down arrow key.
RightArrow 275 The right arrow key.
LeftArrow 276 The left arrow key.
Insert 277 The insert or "ins" key.
Home 278 The home key.
End 279 The end key.
PageUp 280 The Page Up or "PgUp" key.
PageDown 281 The Page Down or "PgDown" key.
F1 282 The F1 key.
F2 283 The F2 key.
F3 284 The F3 key.
F4 285 The F4 key.
F5 286 The F5 key.
F6 287 The F6 key.
F7 288 The F7 key.
F8 289 The F8 key.
F9 290 The F9 key.
F10 291 The F10 key.
F11 292 The F11 key.
F12 293 The F12 key.
F13 294 The F13 key.
F14 295 The F14 key.
F15 296 The F15 key.
Numlock 300 The Num Lock key.
CapsLock 301 The Caps Lock key.
ScrollLock 302 The Scroll Lock key.
RightShift 303 The right Shift key.
LeftShift 304 The left Shift key.
RightControl 305 The right control or "Ctrl" key.
LeftControl 306 The left control or "Ctrl" key.
RightAlt 307 The right Alt or ⌥ Option key.
LeftAlt 308 The left Alt or ⌥ Option key.
RightApple 309 This value appears to be unused internally.
RightCommand 309 This value appears to be unused internally.
LeftApple 310 This value appears to be unused internally.
LeftCommand 310 This value appears to be unused internally.
LeftWindows 311 The left Windows, "Meta" or ⌘ Command key.
RightWindows 312 The right Windows, "Meta" or ⌘ Command key.
AltGr 313 The same key as RightAlt.
Help 315 This value appears to be unused internally.
Print 316 The Print Screen key.
SysReq 317 This value appears to be unused internally.
Break 318 This value appears to be unused internally.
Menu 319 This value appears to be unused internally.
Shift 512 Either LeftShift or RightShift.
Control 513 Either LeftControl or RightControl.
Alt 514 Either LeftAlt or RightAlt.
Windows 515 Either LeftWindows or RightWindows.