Difference between revisions of "DirectX Scan Codes"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(Added to category.)
imported>Google0013
(Update with more valid keycodes)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
A scan code is a number assigned to each key on a keyboard. A keyboard reports which keys have been pressed by sending this code to the computer.
A scan code is a number assigned to each key on a keyboard. A keyboard reports which keys have been pressed by sending this code to the computer.


<source lang="html4strict">Button Dec
<source lang="html4strict">Button         Dec
Escape  27 
BACKSPACE      8
Q  81
TAB             9
W  87
ENTER           13
E  69
CAPS LOCK      20
R  82
ESCAPE          27
T  84
SPACE          32
Y  89
PGUP            33
U  85
PGDOWN          34
I  73
END            35
O  79
HOME            36
P  80
LEFT            37
TAB 9
UP              38
ENTER 13
RIGHT          39
A  65
DOWN            40
S  83
DELETE          46
D  68
0              48
F  70
1               49
G  71
2               50
H  72
3               51
J  74
4               52
K  75
5               53
L  76
6               54
;  186
7               55
Z  90
8               56
V  86
9               57
B  66 
A              65
N  78
B              66
M  77
C              67
,  188
D              68
.  190
E              69
/  191
F              70
L-SHIFT  160
G              71
R-SHIFT  161
H              72
SPACE  32
I              73
L-ALT  164
J              74
R-ALT  165
K              75
L-CTRL  162
L              76
R-CTRL  163
M              77
1 49
N              78
2 50
O              79
3 51
P              80
4 52
Q              81
5 53
R              82
6 54
S              83
7 55
T              84
8 56
U              85
9 57
V              86
0  48
W              87
-  189
X              88
=  187
Y              89
BACKSPACE  8
Z              90
UP  38
SUPER          92
LEFT  37
Num0           96
DOWN  40
Num1           97
RIGHT  39
Num2           98
DELETE  46
Num3           99
END  35
Num4           100
PGDOWN  34
Num5           101
PGUP  33
Num6           102
HOME  36
Num7           103
Num0 96
Num8           104
Num1 97
Num9           105
Num2 98
Num*            106
Num3 99
Num+           107
Num4 100
Num-           109
Num5 101
Num.            110
Num6 102
Num/           111
Num7 103
F1             112
Num8 104
F2             113
Num9 105
F3             114
Num.  110
F4             115
NumENTER  13
F5             116
Num+ 107
F6             117
Num- 109
F7             118
Num*  106
F8             119
Num/ 111
F9             120
F1 112
F10             121
F2 113
F11             122
F3 114
NUMLOCK        144
F4 115
SCRLOCK        145
F5 116
L-SHIFT        160
F6 117
R-SHIFT        161
F7 118
L-CTRL          162
F8 119
R-CTRL          163
F9 120
L-ALT          164
F10 121
R-ALT          165
F11 122
;              186
=              187
,              188
-              189
.              190
/              191
[              219
\              220
]              221
'              222
\              226
Mouse1          256
Mouse2          257
Mouse3          258
Mouse4          259
Mouse5          260
</source>
</source>
== Snippets==
<source lang="papyrus">
Group KeyCodes
    int Property Backspace = 8 AutoReadOnly
    int Property Tab = 9 AutoReadOnly
    int Property Enter = 13 AutoReadOnly
    int Property CapsLock = 20 AutoReadOnly
    int Property Escape = 27 AutoReadOnly
    int Property Space = 32 AutoReadOnly
    int Property PageUp = 33 AutoReadOnly
    int Property PageDown = 34 AutoReadOnly
    int Property End = 35 AutoReadOnly
    int Property Home = 36 AutoReadOnly
    int Property Left = 37 AutoReadOnly
    int Property Up = 38 AutoReadOnly
    int Property Right = 39 AutoReadOnly
    int Property Down = 40 AutoReadOnly
    int Property Delete = 46 AutoReadOnly
    int Property Number0 = 48 AutoReadOnly
    int Property Number1 = 49 AutoReadOnly
    int Property Number2 = 50 AutoReadOnly
    int Property Number3 = 51 AutoReadOnly
    int Property Number4 = 52 AutoReadOnly
    int Property Number5 = 53 AutoReadOnly
    int Property Number6 = 54 AutoReadOnly
    int Property Number7 = 55 AutoReadOnly
    int Property Number8 = 56 AutoReadOnly
    int Property Number9 = 57 AutoReadOnly
    int Property A = 65 AutoReadOnly
    int Property B = 66 AutoReadOnly
    int Property C = 67 AutoReadOnly
    int Property D = 68 AutoReadOnly
    int Property E = 69 AutoReadOnly
    int Property F = 70 AutoReadOnly
    int Property G = 71 AutoReadOnly
    int Property H = 72 AutoReadOnly
    int Property I = 73 AutoReadOnly
    int Property J = 74 AutoReadOnly
    int Property K = 75 AutoReadOnly
    int Property L = 76 AutoReadOnly
    int Property M = 77 AutoReadOnly
    int Property N = 78 AutoReadOnly
    int Property O = 79 AutoReadOnly
    int Property P = 80 AutoReadOnly
    int Property Q = 81 AutoReadOnly
    int Property R = 82 AutoReadOnly
    int Property S = 83 AutoReadOnly
    int Property T = 84 AutoReadOnly
    int Property U = 85 AutoReadOnly
    int Property V = 86 AutoReadOnly
    int Property W = 87 AutoReadOnly
    int Property X = 88 AutoReadOnly
    int Property Y = 89 AutoReadOnly
    int Property Z = 90 AutoReadOnly
    int Property Super = 92 AutoReadOnly
    int Property NumPad0 = 96 AutoReadOnly
    int Property NumPad1 = 97 AutoReadOnly
    int Property NumPad2 = 98 AutoReadOnly
    int Property NumPad3 = 99 AutoReadOnly
    int Property NumPad4 = 100 AutoReadOnly
    int Property NumPad5 = 101 AutoReadOnly
    int Property NumPad6 = 102 AutoReadOnly
    int Property NumPad7 = 103 AutoReadOnly
    int Property NumPad8 = 104 AutoReadOnly
    int Property NumPad9 = 105 AutoReadOnly
    int Property NumPadAsterisk = 106 AutoReadOnly
    int Property NumPadPlus = 107 AutoReadOnly
    int Property NumPadMinus = 109 AutoReadOnly
    int Property NumPadPeriod = 110 AutoReadOnly
    int Property NumPadFowardSlash = 111 AutoReadOnly
    int Property F1 = 112 AutoReadOnly
    int Property F2 = 113 AutoReadOnly
    int Property F3 = 114 AutoReadOnly
    int Property F4 = 115 AutoReadOnly
    int Property F5 = 116 AutoReadOnly
    int Property F6 = 117 AutoReadOnly
    int Property F7 = 118 AutoReadOnly
    int Property F8 = 119 AutoReadOnly
    int Property F9 = 120 AutoReadOnly
    int Property F10 = 121 AutoReadOnly
    int Property F11 = 122 AutoReadOnly
    int Property NumLock = 144 AutoReadOnly
    int Property ScrLock = 145 AutoReadOnly
    int Property LShift = 160 AutoReadOnly
    int Property RShift = 161 AutoReadOnly
    int Property LCtrl = 162 AutoReadOnly
    int Property RCrtl = 163 AutoReadOnly
    int Property LAlt = 164 AutoReadOnly
    int Property RAlt = 165 AutoReadOnly
    int Property SemiColon = 186 AutoReadOnly
    int Property Equals = 187 AutoReadOnly
    int Property Comma = 188 AutoReadOnly
    int Property Minus = 189 AutoReadOnly
    int Property Period = 190 AutoReadOnly
    int Property ForwardSlash = 191 AutoReadOnly
    int Property LeftBracket = 219 AutoReadOnly
    int Property BackwardSlash01 = 220 AutoReadOnly
    int Property RightBracket = 221 AutoReadOnly
    int Property Apostrophe = 222 AutoReadOnly
    int Property BackwardSlash02 = 226 AutoReadOnly
    int Property Mouse1 = 256 AutoReadOnly
    int Property Mouse2 = 257 AutoReadOnly
    int Property Mouse3 = 258 AutoReadOnly
    int Property Mouse4 = 259 AutoReadOnly
    int Property Mouse5 = 260 AutoReadOnly
EndGroup
</source>


== Notes ==
== Notes ==
*It seems that some keys don't fire if they are used by game, such as L-Alt and L-Ctrl. (They must be unused by control scheme).
*It seems that some keys don't fire if they are used by game, such as L-Alt and L-Ctrl. (They must be unused by control scheme).


== See Also ==
== See Also ==

Latest revision as of 23:16, 12 August 2017

A scan code is a number assigned to each key on a keyboard. A keyboard reports which keys have been pressed by sending this code to the computer.

Button          Dec
BACKSPACE       8
TAB             9
ENTER           13
CAPS LOCK       20
ESCAPE          27
SPACE           32
PGUP            33
PGDOWN          34
END             35
HOME            36
LEFT            37
UP              38
RIGHT           39
DOWN            40
DELETE          46
0               48
1               49
2               50
3               51
4               52
5               53
6               54
7               55
8               56
9               57
A               65
B               66
C               67
D               68
E               69
F               70
G               71
H               72
I               73
J               74
K               75
L               76
M               77
N               78
O               79
P               80
Q               81
R               82
S               83
T               84
U               85
V               86
W               87
X               88
Y               89
Z               90
SUPER           92
Num0            96
Num1            97
Num2            98
Num3            99
Num4            100
Num5            101
Num6            102
Num7            103
Num8            104
Num9            105
Num*            106
Num+            107
Num-            109
Num.            110
Num/            111
F1              112
F2              113
F3              114
F4              115
F5              116
F6              117
F7              118
F8              119
F9              120
F10             121
F11             122
NUMLOCK         144
SCRLOCK         145
L-SHIFT         160
R-SHIFT         161
L-CTRL          162
R-CTRL          163
L-ALT           164
R-ALT           165
;               186
=               187
,               188
-               189
.               190
/               191
[               219
\               220
]               221
'               222
\               226
Mouse1          256
Mouse2          257
Mouse3          258
Mouse4          259
Mouse5          260


Snippets[edit | edit source]

Group KeyCodes
    int Property Backspace = 8 AutoReadOnly
    int Property Tab = 9 AutoReadOnly
    int Property Enter = 13 AutoReadOnly
    int Property CapsLock = 20 AutoReadOnly
    int Property Escape = 27 AutoReadOnly
    int Property Space = 32 AutoReadOnly
    int Property PageUp = 33 AutoReadOnly
    int Property PageDown = 34 AutoReadOnly
    int Property End = 35 AutoReadOnly
    int Property Home = 36 AutoReadOnly
    int Property Left = 37 AutoReadOnly
    int Property Up = 38 AutoReadOnly
    int Property Right = 39 AutoReadOnly
    int Property Down = 40 AutoReadOnly
    int Property Delete = 46 AutoReadOnly
    int Property Number0 = 48 AutoReadOnly
    int Property Number1 = 49 AutoReadOnly
    int Property Number2 = 50 AutoReadOnly
    int Property Number3 = 51 AutoReadOnly
    int Property Number4 = 52 AutoReadOnly
    int Property Number5 = 53 AutoReadOnly
    int Property Number6 = 54 AutoReadOnly
    int Property Number7 = 55 AutoReadOnly
    int Property Number8 = 56 AutoReadOnly
    int Property Number9 = 57 AutoReadOnly
    int Property A = 65 AutoReadOnly
    int Property B = 66 AutoReadOnly
    int Property C = 67 AutoReadOnly
    int Property D = 68 AutoReadOnly
    int Property E = 69 AutoReadOnly
    int Property F = 70 AutoReadOnly
    int Property G = 71 AutoReadOnly
    int Property H = 72 AutoReadOnly
    int Property I = 73 AutoReadOnly
    int Property J = 74 AutoReadOnly
    int Property K = 75 AutoReadOnly
    int Property L = 76 AutoReadOnly
    int Property M = 77 AutoReadOnly
    int Property N = 78 AutoReadOnly
    int Property O = 79 AutoReadOnly
    int Property P = 80 AutoReadOnly
    int Property Q = 81 AutoReadOnly
    int Property R = 82 AutoReadOnly
    int Property S = 83 AutoReadOnly
    int Property T = 84 AutoReadOnly
    int Property U = 85 AutoReadOnly
    int Property V = 86 AutoReadOnly
    int Property W = 87 AutoReadOnly
    int Property X = 88 AutoReadOnly
    int Property Y = 89 AutoReadOnly
    int Property Z = 90 AutoReadOnly
    int Property Super = 92 AutoReadOnly
    int Property NumPad0 = 96 AutoReadOnly
    int Property NumPad1 = 97 AutoReadOnly
    int Property NumPad2 = 98 AutoReadOnly
    int Property NumPad3 = 99 AutoReadOnly
    int Property NumPad4 = 100 AutoReadOnly
    int Property NumPad5 = 101 AutoReadOnly
    int Property NumPad6 = 102 AutoReadOnly
    int Property NumPad7 = 103 AutoReadOnly
    int Property NumPad8 = 104 AutoReadOnly
    int Property NumPad9 = 105 AutoReadOnly
    int Property NumPadAsterisk = 106 AutoReadOnly
    int Property NumPadPlus = 107 AutoReadOnly
    int Property NumPadMinus = 109 AutoReadOnly
    int Property NumPadPeriod = 110 AutoReadOnly
    int Property NumPadFowardSlash = 111 AutoReadOnly
    int Property F1 = 112 AutoReadOnly
    int Property F2 = 113 AutoReadOnly
    int Property F3 = 114 AutoReadOnly
    int Property F4 = 115 AutoReadOnly
    int Property F5 = 116 AutoReadOnly
    int Property F6 = 117 AutoReadOnly
    int Property F7 = 118 AutoReadOnly
    int Property F8 = 119 AutoReadOnly
    int Property F9 = 120 AutoReadOnly
    int Property F10 = 121 AutoReadOnly
    int Property F11 = 122 AutoReadOnly
    int Property NumLock = 144 AutoReadOnly
    int Property ScrLock = 145 AutoReadOnly
    int Property LShift = 160 AutoReadOnly
    int Property RShift = 161 AutoReadOnly
    int Property LCtrl = 162 AutoReadOnly
    int Property RCrtl = 163 AutoReadOnly
    int Property LAlt = 164 AutoReadOnly
    int Property RAlt = 165 AutoReadOnly
    int Property SemiColon = 186 AutoReadOnly
    int Property Equals = 187 AutoReadOnly
    int Property Comma = 188 AutoReadOnly
    int Property Minus = 189 AutoReadOnly
    int Property Period = 190 AutoReadOnly
    int Property ForwardSlash = 191 AutoReadOnly
    int Property LeftBracket = 219 AutoReadOnly
    int Property BackwardSlash01 = 220 AutoReadOnly
    int Property RightBracket = 221 AutoReadOnly
    int Property Apostrophe = 222 AutoReadOnly
    int Property BackwardSlash02 = 226 AutoReadOnly
    int Property Mouse1 = 256 AutoReadOnly
    int Property Mouse2 = 257 AutoReadOnly
    int Property Mouse3 = 258 AutoReadOnly
    int Property Mouse4 = 259 AutoReadOnly
    int Property Mouse5 = 260 AutoReadOnly
EndGroup


Notes[edit | edit source]

  • It seems that some keys don't fire if they are used by game, such as L-Alt and L-Ctrl. (They must be unused by control scheme).


See Also[edit | edit source]