Editing DirectX Scan Codes

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

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

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)