Enum Scancode
Represents a keyboard scancode
public enum Scancode
Fields
A = 4The Scancode for the A key
Again = 121The Scancode for the AGAIN (again / redo) key
AltErase = 153Apostrophe = 52The Scancode for the ' key
Application = 101The Scancode for the ☰ (context menu) key on Windows, or the COMPOSE (compose) key elsewhere
ApplicationControlBack = 282The Scancode for the application control "Back" key
ApplicationControlBookmarks = 286The Scancode for the application control "Bookmarks" key
ApplicationControlClose = 275The Scancode for the application control "Close" key
ApplicationControlExit = 276The Scancode for the application control "Exit" key
ApplicationControlForward = 283The Scancode for the application control "Forward" key
ApplicationControlHome = 281The Scancode for the application control "Home" key
ApplicationControlNew = 273The Scancode for the application control "New" key
ApplicationControlOpen = 274The Scancode for the application control "Open" key
ApplicationControlPrint = 278The Scancode for the application control "Print" key
ApplicationControlProperties = 279The Scancode for the application control "Properties" key
ApplicationControlRefresh = 285The Scancode for the application control "Refresh" key
ApplicationControlSave = 277The Scancode for the application control "Save" key
ApplicationControlSearch = 280The Scancode for the application control "Search" key
ApplicationControlStop = 284The Scancode for the application control "Stop" key
B = 5The Scancode for the B key
Backslash = 49The Scancode for the </kbd> key in US layouts
This key Located at the lower left of the ⏎ (return / enter) key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards.
This key produces:
- '\' (back slash) and '|' (vertical line) in a US layout and in a UK Mac layout
- '#' (number sign) and '~' (tilde) in a UK Windows layout
- '$' (dollar sign) and '£' (pound sign) in a Swiss German layout
- '#' (number sign) and ''' (apostrophe) in a German layout
- '`' (accent grave) and '£' (pound sign) in a French Mac layout
- '*' (asterisk) and 'µ' (micro sign) in a French Windows layout
Backspace = 42The Scancode for the ⌫ (back space) key
C = 6The Scancode for the C key
Call = 289The Scancode for the 📞 (phone call) key on mobiles
Cancel = 155CapsLock = 57The Scancode for the ⇪ (caps lock) key
ChannelDecrement = 261ChannelIncrement = 260Clear = 156ClearAgain = 162Comma = 54The Scancode for the , key
Copy = 124The Scancode for the COPY (copy) key
CrSel = 163CurrencySubunit = 181CurrencyUnit = 180Cut = 123The Scancode for the CUT (cut) key
D = 7The Scancode for the D key
DecimalSeparator = 179Delete = 76The Scancode for the DELETE (delete) key
Down = 81The Scancode for the ↓ (down arrow) key
E = 8The Scancode for the E key
End = 77The Scancode for the END (end) key
EndCall = 290The Scancode for the END 📞 (end phone call) key on mobiles
Equals = 46The Scancode for the = key
Escape = 41The Scancode for the ESC (escape) key
ExSel = 164Execute = 116The Scancode for the EXECUTE (execute) key
F = 9The Scancode for the F key
F1 = 58The Scancode for the F1 key
F10 = 67The Scancode for the F10 key
F11 = 68The Scancode for the F11 key
F12 = 69The Scancode for the F12 key
F13 = 104The Scancode for the F13 key
F14 = 105The Scancode for the F14 key
F15 = 106The Scancode for the F15 key
F16 = 107The Scancode for the F16 key
F17 = 108The Scancode for the F17 key
F18 = 109The Scancode for the F18 key
F19 = 110The Scancode for the F19 key
F2 = 59The Scancode for the F2 key
F20 = 111The Scancode for the F20 key
F21 = 112The Scancode for the F21 key
F22 = 113The Scancode for the F22 key
F23 = 114The Scancode for the F23 key
F24 = 115The Scancode for the F24 key
F3 = 60The Scancode for the F3 key
F4 = 61The Scancode for the F4 key
F5 = 62The Scancode for the F5 key
F6 = 63The Scancode for the F6 key
F7 = 64The Scancode for the F7 key
F8 = 65The Scancode for the F8 key
F9 = 66The Scancode for the F9 key
Find = 126The Scancode for the 🔍 (find) key
G = 10The Scancode for the G key
Grave = 53The Scancode for the ` key in US layouts
This key Located at the top left corner.
This key produces:
- '`' (accent grave) and '~' (tilde) in a US Windows layout and in US and UK Mac layouts on ASNI keyboards
- '`' (accent grave) and '¬' (not sign) in a UK Windows layout
- '§' (section sign) and '±' (plus-minus sign) in US and UK Mac layouts on ISO keyboards
- '§' (section sign) and '°' (degree sign) in a Swiss German layout (for Macs only on ISO keyboards)
- '^' (accent circumflex) and '°' (degree sign) in a German layout (for Macs only on ISO keyboards)
- '²' (superscript two) and '~' (tilde) in a French Windows layout
- '@' (commercial at sign) and '#' (number sign) in a French Mac layout on ISO keyboards
- '<' (less than sign) and '>' (greater than sign) in a Swiss German, German, or French Mac layout on ANSI keyboards
H = 11The Scancode for the H key
Help = 117The Scancode for the HELP (help) key
Home = 74The Scancode for the HOME (home) key
I = 12The Scancode for the I key
Insert = 73The Scancode for the INSERT (insert) key
On some Mac keyboards this is actual send as the Scancode for the HELP (help) key instead of Help.
International1 = 135Used on Asian keyboards, see footnotes in USB keyboard documentation.
International2 = 136International3 = 137Yen.
International4 = 138International5 = 139International6 = 140International7 = 141International8 = 142International9 = 143J = 13The Scancode for the J key
K = 14The Scancode for the K key
Keypad0 = 98The Scancode for the 0 key on the keypad
Keypad00 = 176Keypad000 = 177Keypad1 = 89The Scancode for the 1 key on the keypad
Keypad2 = 90The Scancode for the 2 key on the keypad
Keypad3 = 91The Scancode for the 3 key on the keypad
Keypad4 = 92The Scancode for the 4 key on the keypad
Keypad5 = 93The Scancode for the 5 key on the keypad
Keypad6 = 94The Scancode for the 6 key on the keypad
Keypad7 = 95The Scancode for the 7 key on the keypad
Keypad8 = 96The Scancode for the 8 key on the keypad
Keypad9 = 97The Scancode for the 9 key on the keypad
KeypadA = 188The Scancode for the A key on the keypad
KeypadAmpersand = 199The Scancode for the & (and; sometimes
AND) key on the keypadKeypadAt = 206The Scancode for the @ key on the keypad
KeypadB = 189The Scancode for the B key on the keypad
KeypadBackspace = 187The Scancode for the ⌫ (back space) key on the keypad
KeypadBinary = 218KeypadC = 190The Scancode for the C key on the keypad
KeypadClear = 216The Scancode for the CLEAR (clear) key on the keypad
KeypadClearEntry = 217KeypadColon = 203The Scancode for the : key on the keypad
KeypadComma = 133The Scancode for the , key on the keypad
KeypadD = 191The Scancode for the D key on the keypad
KeypadDecimal = 220KeypadDivide = 84The Scancode for the / (divide) key on the keypad
KeypadDoubleAmpersand = 200The Scancode for the && key on the keypad
KeypadDoubleVerticalBar = 202The Scancode for the || key on the keypad
KeypadE = 192The Scancode for the E key on the keypad
KeypadEnter = 88The Scancode for the ⏎ (return / enter) key on the keypad
KeypadEquals = 103The Scancode for the = key on the keypad
KeypadEqualsAS400 = 134The Scancode for the = AS400 key on the keypad
KeypadExclamationMark = 207The Scancode for the ! key on the keypad
KeypadF = 193The Scancode for the F key on the keypad
KeypadGreater = 198The Scancode for the > key on the keypad
KeypadHash = 204The Scancode for the # key on the keypad
KeypadHexadecimal = 221KeypadLeftBrace = 184The Scancode for the { key on the keypad
KeypadLeftParenthesis = 182The Scancode for the ( key on the keypad
KeypadLess = 197The Scancode for the < key on the keypad
KeypadMemAdd = 211The Scancode for the MEM + (mem add) key on the keypad
KeypadMemClear = 210The Scancode for the MEM CLEAR (mem clear) key on the keypad
KeypadMemDivide = 214The Scancode for the MEM / (mem divide) key on the keypad
KeypadMemMultiply = 213The Scancode for the MEM * (mem multiply) key on the keypad
KeypadMemRecall = 209The Scancode for the MEM RECALL (mem recall) key on the keypad
KeypadMemStore = 208The Scancode for the MEM STORE (mem store) key on the keypad
KeypadMemSubtract = 212The Scancode for the MEM - (mem subtract) key on the keypad
KeypadMinus = 86The Scancode for the - (minus) key on the keypad
KeypadMultiply = 85The Scancode for the * (multiply) key on the keypad
KeypadOctal = 219KeypadPercent = 196The Scancode for the % key on the keypad
KeypadPeriod = 99The Scancode for the . key on the keypad
KeypadPlus = 87The Scancode for the + (divide) key on the keypad
KeypadPlusMinus = 215The Scancode for the ± (plus-minus) key on the keypad
KeypadPower = 195The Scancode for the xʸ (power / exponentiation; sometimes
^) key on the keypadKeypadRightBrace = 185The Scancode for the } key on the keypad
KeypadRightParenthesis = 183The Scancode for the ) key on the keypad
KeypadSpace = 205The Scancode for the ⎵ (space) key on the keypad
KeypadTab = 186The Scancode for the ⭾ (tab) key on the keypad
KeypadVerticalBar = 201The Scancode for the | (or; sometimes
OR) key on the keypadKeypadXor = 194The Scancode for the XOR (xor; sometimes
^) key on the keypadL = 15The Scancode for the L key
Language1 = 144Hangul/English toggle.
Language2 = 145Hanja conversion.
Language3 = 146Katakana.
Language4 = 147Hiragana.
Language5 = 148Zenkaku/Hankaku.
[Experimental("SDL5011")] Language6 = 149[Experimental("SDL5011")] Language7 = 150[Experimental("SDL5011")] Language8 = 151[Experimental("SDL5011")] Language9 = 152Left = 80The Scancode for the ← (left arrow) key
LeftAlt = 226The Scancode for the left ALT (left alt) key
LeftBracket = 47The Scancode for the [ key
LeftControl = 224The Scancode for the left CTRL (left control) key
LeftGui = 227The Scancode for the left ⊞ (left Windows) key on PCs, left ⌘ (left command) key on Macs, or sometimes called left meta key
LeftShift = 225The Scancode for the left ⇧ (left shift) key
M = 16The Scancode for the M key
MediaEject = 270The Scancode for the ⏏ (media eject) key
MediaFastForward = 265The Scancode for the ⏩ (media fast forward) key
MediaNextTrack = 267The Scancode for the ⏭ (media next track) key
MediaPause = 263The Scancode for the ⏸ (media pause) key
MediaPlay = 262The Scancode for the ⏵ (media play) key
MediaPlayPause = 271The Scancode for the ⏯ (play-pause eject) key
MediaPreviousTrack = 268The Scancode for the ⏮ (media previous track) key
MediaRecord = 264The Scancode for the ⏺ (media record) key
MediaRewind = 266The Scancode for the ⏪ (media rewind) key
MediaSelect = 272MediaStop = 269The Scancode for the ⏹ (media stop) key
Menu = 118The Scancode for the ☰ (menu / show menu) key
Minus = 45The Scancode for the - key
Mode = 257Mute = 127The Scancode for the 🔇 (mute volume) key
N = 17The Scancode for the N key
NonUsBackslash = 100The Scancode for the additional key, located between the left ⇧ (shift) key and the Y key, on ISO keyboards
This is the additional key that ISO keyboards have over ANSI ones, located between the left ⇧ (shift) key and the Y key.
This key produces:
- '`' (accent grave) and '~' (tilde) in a US or UK Mac layout
- '\' (back slash) and '|' (vertical line) in a US or UK Windows layout
- '<' (less than sign) and '>' (greater than sign) in a Swiss German, German, or French layout
NonUsHash = 50The alternative Scancode that ISO USB keyboards use for Backslash
All relevant operating systems treat this Scancode and Backslash identically.
You should not generate this Scancode, nor should you rely on this Scancode getting generated, because SDL will never do that with most keyboards.
NumLockOrClear = 83The Scancode for the NUM (num lock) key on PCs, or the CLEAR (clear) key on Macs
O = 18The Scancode for the O key
Oper = 161Out = 160P = 19The Scancode for the P key
PageDown = 78The Scancode for the PAGE DOWN (page down) key
PageUp = 75The Scancode for the PAGE UP (page up) key
Paste = 125The Scancode for the PASTE (paste) key
Pause = 72The Scancode for the PAUSE (pause / break) key
Period = 55The Scancode for the . key
[Experimental("SDL5010")] Power = 102The Scancode that might be for the POWER (power) key on some Mac keyboards
Do not rely on this, as the USB document says that this is a status flag instead of a physical key.
PrintScreen = 70The Scancode for the PRINT SCREEN (print screen) key
Prior = 157Q = 20The Scancode for the Q key
R = 21The Scancode for the R key
Return = 40The Scancode for the ⏎ (return / enter) key
Return2 = 158Right = 79The Scancode for the → (right arrow) key
RightAlt = 230The Scancode for the right ALT (right alt) key, or sometimes called ALT GR (alt gr.) key
RightBracket = 48The Scancode for the ] key
RightControl = 228The Scancode for the right CTRL key (right control) key
RightGui = 231The Scancode for the right ⊞ (right Windows) key on PCs, right ⌘ (right command) key on Macs, or sometimes called right meta key
RightShift = 229The Scancode for the right ⇧ (right shift) key
S = 22The Scancode for the S key
ScrollLock = 71The Scancode for the SCROLL (scroll lock) key
Select = 119The Scancode for the SELECT (select) key
Semicolon = 51The Scancode for the ; key
Separator = 159Slash = 56The Scancode for the / key
Sleep = 258SoftwareLeft = 287The Scancode for left software defined key on mobiles
This key is usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.
SoftwareRight = 288The Scancode for right software defined key on mobiles
This key is usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.
Space = 44The Scancode for the ⎵ (space) key
Stop = 120The Scancode for the STOP (stop) key
SysReq = 154T = 23The Scancode for the T key
Tab = 43The Scancode for the ⭾ (tab) key
ThousandsSeparator = 178U = 24The Scancode for the U key
Undo = 122The Scancode for the UNDO (undo) key
Unknown = 0A representative for an unknown Scancode
Up = 82The Scancode for the ↑ (up arrow) key
V = 25The Scancode for the V key
VolumeDown = 129The Scancode for the 🔉 (volume down) key
VolumeUp = 128The Scancode for the 🔊 (volume up) key
W = 26The Scancode for the W key
Wake = 259X = 27The Scancode for the X key
Y = 28The Scancode for the Y key
Z = 29The Scancode for the Z key
_0 = 39The Scancode for the 0 key
_1 = 30The Scancode for the 1 key
_2 = 31The Scancode for the 2 key
_3 = 32The Scancode for the 3 key
_4 = 33The Scancode for the 4 key
_5 = 34The Scancode for the 5 key
_6 = 35The Scancode for the 6 key
_7 = 36The Scancode for the _7 key
_8 = 37The Scancode for the 8 key
_9 = 38The Scancode for the 9 key
Remarks
This represents a scancode for a key on a keyboard, which is different to a virtual key.