<!--
{
  "documentType" : "article",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/keycode-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Keycode Constants"
}
-->

# Keycode Constants

Constants for the codes of keyboard keys.

## Topics

### Letter and Number Keys

[`let GCKeyA: String`](/documentation/GameController/GCKeyA)

The keyboard code for the a or A character.

[`let GCKeyB: String`](/documentation/GameController/GCKeyB)

The keyboard code for the b or B character.

[`let GCKeyC: String`](/documentation/GameController/GCKeyC)

The keyboard code for the c or C character.

[`let GCKeyD: String`](/documentation/GameController/GCKeyD)

The keyboard code for the d or D character.

[`let GCKeyE: String`](/documentation/GameController/GCKeyE)

The keyboard code for the e or E character.

[`let GCKeyF: String`](/documentation/GameController/GCKeyF)

The keyboard code for the f or F character.

[`let GCKeyG: String`](/documentation/GameController/GCKeyG)

The keyboard code for the g or G character.

[`let GCKeyH: String`](/documentation/GameController/GCKeyH)

The keyboard code for the h or H character.

[`let GCKeyI: String`](/documentation/GameController/GCKeyI)

The keyboard code for the i or I character.

[`let GCKeyJ: String`](/documentation/GameController/GCKeyJ)

The keyboard code for the j or J character.

[`let GCKeyK: String`](/documentation/GameController/GCKeyK)

The keyboard code for the k or K character.

[`let GCKeyL: String`](/documentation/GameController/GCKeyL)

The keyboard code for the l or L character.

[`let GCKeyM: String`](/documentation/GameController/GCKeyM)

The keyboard code for the m or M character.

[`let GCKeyN: String`](/documentation/GameController/GCKeyN)

The keyboard code for the n or N character.

[`let GCKeyO: String`](/documentation/GameController/GCKeyO)

The keyboard code for the o or O character.

[`let GCKeyP: String`](/documentation/GameController/GCKeyP)

The keyboard code for the p or P character.

[`let GCKeyQ: String`](/documentation/GameController/GCKeyQ)

The keyboard code for the q or Q character.

[`let GCKeyR: String`](/documentation/GameController/GCKeyR)

The keyboard code for the r or R character.

[`let GCKeyS: String`](/documentation/GameController/GCKeyS)

The keyboard code for the s or S character.

[`let GCKeyT: String`](/documentation/GameController/GCKeyT)

The keyboard code for the t or T character.

[`let GCKeyU: String`](/documentation/GameController/GCKeyU)

The keyboard code for the u or U character.

[`let GCKeyV: String`](/documentation/GameController/GCKeyV)

The keyboard code for the v or V character.

[`let GCKeyW: String`](/documentation/GameController/GCKeyW)

The keyboard code for the w or W character.

[`let GCKeyX: String`](/documentation/GameController/GCKeyX)

The keyboard code for the x or X character.

[`let GCKeyY: String`](/documentation/GameController/GCKeyY)

The keyboard code for the y or Y character.

[`let GCKeyZ: String`](/documentation/GameController/GCKeyZ)

The keyboard code for the z or Z character.

[`let GCKeyOne: String`](/documentation/GameController/GCKeyOne)

The keyboard code for the 1 or ! character.

[`let GCKeyTwo: String`](/documentation/GameController/GCKeyTwo)

The keyboard code for the 2 or @ character.

[`let GCKeyThree: String`](/documentation/GameController/GCKeyThree)

The keyboard code for the 3 or # character.

[`let GCKeyFour: String`](/documentation/GameController/GCKeyFour)

The keyboard code for the 4 or $ character.

[`let GCKeyFive: String`](/documentation/GameController/GCKeyFive)

The keyboard code for the 5 or % character.

[`let GCKeySix: String`](/documentation/GameController/GCKeySix)

The keyboard code for the 6 or ^ character.

[`let GCKeySeven: String`](/documentation/GameController/GCKeySeven)

The keyboard code for the 7 or & character.

[`let GCKeyEight: String`](/documentation/GameController/GCKeyEight)

The keyboard code for the 8 or * character.

[`let GCKeyNine: String`](/documentation/GameController/GCKeyNine)

The keyboard code for the 9 or ( character.

[`let GCKeyZero: String`](/documentation/GameController/GCKeyZero)

The keyboard code for the 0 or ) character.

### Punctuation and Command Keys

[`let GCKeyTab: String`](/documentation/GameController/GCKeyTab)

The keyboard code for the Tab key.

[`let GCKeySpacebar: String`](/documentation/GameController/GCKeySpacebar)

The keyboard code for the Space Bar key.

[`let GCKeyHyphen: String`](/documentation/GameController/GCKeyHyphen)

The keyboard code for the - or _ key.

[`let GCKeyEqualSign: String`](/documentation/GameController/GCKeyEqualSign)

The keyboard code for the = or + key.

[`let GCKeyOpenBracket: String`](/documentation/GameController/GCKeyOpenBracket)

The keyboard code for the [ or { key.

[`let GCKeyCloseBracket: String`](/documentation/GameController/GCKeyCloseBracket)

The keyboard code for the ] or } key.

[`let GCKeyBackslash: String`](/documentation/GameController/GCKeyBackslash)

The keyboard code for the \ or | key.

[`let GCKeyNonUSPound: String`](/documentation/GameController/GCKeyNonUSPound)

The keyboard code for the non-US Pound or _ key.

[`let GCKeySemicolon: String`](/documentation/GameController/GCKeySemicolon)

The keyboard code for the ; or : key.

[`let GCKeyQuote: String`](/documentation/GameController/GCKeyQuote)

The keyboard code for the ’ or “ key.

[`let GCKeyGraveAccentAndTilde: String`](/documentation/GameController/GCKeyGraveAccentAndTilde)

The keyboard code for the Grave Accent or Tilde key.

[`let GCKeyComma: String`](/documentation/GameController/GCKeyComma)

The keyboard code for the Comma or < key.

[`let GCKeyPeriod: String`](/documentation/GameController/GCKeyPeriod)

The keyboard code for the Period or > key.

[`let GCKeySlash: String`](/documentation/GameController/GCKeySlash)

The keyboard code for the / or ? key.

[`let GCKeyCapsLock: String`](/documentation/GameController/GCKeyCapsLock)

The keyboard code for the Caps Lock key.

[`let GCKeyDeleteOrBackspace: String`](/documentation/GameController/GCKeyDeleteOrBackspace)

The keyboard code for the Delete or Backspace key.

[`let GCKeyEscape: String`](/documentation/GameController/GCKeyEscape)

The keyboard code for the Escape key.

[`let GCKeyReturnOrEnter: String`](/documentation/GameController/GCKeyReturnOrEnter)

The keyboard code for the Return or Enter key.

[`let GCKeyNonUSBackslash: String`](/documentation/GameController/GCKeyNonUSBackslash)

The keyboard code for the non-US Slash or | key.

[`let GCKeyApplication: String`](/documentation/GameController/GCKeyApplication)

The keyboard code for the Application key.

[`let GCKeyPower: String`](/documentation/GameController/GCKeyPower)

The keyboard code for the Power key.

### Function Keys

[`let GCKeyF1: String`](/documentation/GameController/GCKeyF1)

The keyboard code for the F1 key.

[`let GCKeyF2: String`](/documentation/GameController/GCKeyF2)

The keyboard code for the F2 key.

[`let GCKeyF3: String`](/documentation/GameController/GCKeyF3)

The keyboard code for the F3 key.

[`let GCKeyF4: String`](/documentation/GameController/GCKeyF4)

The keyboard code for the F4 key.

[`let GCKeyF5: String`](/documentation/GameController/GCKeyF5)

The keyboard code for the F5 key.

[`let GCKeyF6: String`](/documentation/GameController/GCKeyF6)

The keyboard code for the F6 key.

[`let GCKeyF7: String`](/documentation/GameController/GCKeyF7)

The keyboard code for the F7 key.

[`let GCKeyF8: String`](/documentation/GameController/GCKeyF8)

The keyboard code for the F8 key.

[`let GCKeyF9: String`](/documentation/GameController/GCKeyF9)

The keyboard code for the F9 key.

[`let GCKeyF10: String`](/documentation/GameController/GCKeyF10)

The keyboard code for the F10 key.

[`let GCKeyF11: String`](/documentation/GameController/GCKeyF11)

The keyboard code for the F11 key.

[`let GCKeyF12: String`](/documentation/GameController/GCKeyF12)

The keyboard code for the F12 key.

[`let GCKeyF13: String`](/documentation/GameController/GCKeyF13)

The keyboard code for the F13 key.

[`let GCKeyF14: String`](/documentation/GameController/GCKeyF14)

The keyboard code for the F14 key.

[`let GCKeyF15: String`](/documentation/GameController/GCKeyF15)

The keyboard code for the F15 key.

[`let GCKeyF16: String`](/documentation/GameController/GCKeyF16)

The keyboard code for the F16 key.

[`let GCKeyF17: String`](/documentation/GameController/GCKeyF17)

The keyboard code for the F17 key.

[`let GCKeyF18: String`](/documentation/GameController/GCKeyF18)

The keyboard code for the F18 key.

[`let GCKeyF19: String`](/documentation/GameController/GCKeyF19)

The keyboard code for the F19 key.

[`let GCKeyF20: String`](/documentation/GameController/GCKeyF20)

The keyboard code for the F20 key.

### Directional and Similar Keys

[`let GCKeyPrintScreen: String`](/documentation/GameController/GCKeyPrintScreen)

The keyboard code for the Print Screen key.

[`let GCKeyScrollLock: String`](/documentation/GameController/GCKeyScrollLock)

The keyboard code for the Scroll Lock key.

[`let GCKeyPause: String`](/documentation/GameController/GCKeyPause)

The keyboard code for the Pause key.

[`let GCKeyInsert: String`](/documentation/GameController/GCKeyInsert)

The keyboard code for the Insert key.

[`let GCKeyHome: String`](/documentation/GameController/GCKeyHome)

The keyboard code for the Home key.

[`let GCKeyPageUp: String`](/documentation/GameController/GCKeyPageUp)

The keyboard code for the Page Up key.

[`let GCKeyDeleteForward: String`](/documentation/GameController/GCKeyDeleteForward)

The keyboard code for the Delete-Forward key.

[`let GCKeyEnd: String`](/documentation/GameController/GCKeyEnd)

The keyboard code for the End key.

[`let GCKeyPageDown: String`](/documentation/GameController/GCKeyPageDown)

The keyboard code for the Page Down key.

[`let GCKeyRightArrow: String`](/documentation/GameController/GCKeyRightArrow)

The keyboard code for the Right Arrow key.

[`let GCKeyLeftArrow: String`](/documentation/GameController/GCKeyLeftArrow)

The keyboard code for the Left Arrow key.

[`let GCKeyDownArrow: String`](/documentation/GameController/GCKeyDownArrow)

The keyboard code for the Down Arrow key.

[`let GCKeyUpArrow: String`](/documentation/GameController/GCKeyUpArrow)

The keyboard code for the Up Arrow key.

### Keypad Keys

[`let GCKeyKeypadNumLock: String`](/documentation/GameController/GCKeyKeypadNumLock)

The keyboard code for the keypad Num Lock or Clear key.

[`let GCKeyKeypadSlash: String`](/documentation/GameController/GCKeyKeypadSlash)

The keyboard code for the keypad / key.

[`let GCKeyKeypadAsterisk: String`](/documentation/GameController/GCKeyKeypadAsterisk)

The keyboard code for the keypad * key.

[`let GCKeyKeypadHyphen: String`](/documentation/GameController/GCKeyKeypadHyphen)

The keyboard code for the keypad - key.

[`let GCKeyKeypadPlus: String`](/documentation/GameController/GCKeyKeypadPlus)

The keyboard code for the keypad + key.

[`let GCKeyKeypadEnter: String`](/documentation/GameController/GCKeyKeypadEnter)

The keyboard code for the keypad Enter key.

[`let GCKeyKeypad1: String`](/documentation/GameController/GCKeyKeypad1)

The keyboard code for the keypad 1 or End key.

[`let GCKeyKeypad2: String`](/documentation/GameController/GCKeyKeypad2)

The keyboard code for the keypad 2 or Down Arrow key.

[`let GCKeyKeypad3: String`](/documentation/GameController/GCKeyKeypad3)

The keyboard code for the keypad 3 or Page Down key.

[`let GCKeyKeypad4: String`](/documentation/GameController/GCKeyKeypad4)

The keyboard code for the keypad 4 or Left Arrow key.

[`let GCKeyKeypad5: String`](/documentation/GameController/GCKeyKeypad5)

The keyboard code for the keypad 5 key.

[`let GCKeyKeypad6: String`](/documentation/GameController/GCKeyKeypad6)

The keyboard code for the keypad 6 or Right Arrow key.

[`let GCKeyKeypad7: String`](/documentation/GameController/GCKeyKeypad7)

The keyboard code for the keypad 7 or Home key.

[`let GCKeyKeypad8: String`](/documentation/GameController/GCKeyKeypad8)

The keyboard code for the keypad 8 or Up Arrow key.

[`let GCKeyKeypad9: String`](/documentation/GameController/GCKeyKeypad9)

The keyboard code for the keypad 9 or Page Up key.

[`let GCKeyKeypad0: String`](/documentation/GameController/GCKeyKeypad0)

The keyboard code for the keypad 0 or Insert key.

[`let GCKeyKeypadPeriod: String`](/documentation/GameController/GCKeyKeypadPeriod)

The keyboard code for the keypad Period or Delete key.

[`let GCKeyKeypadEqualSign: String`](/documentation/GameController/GCKeyKeypadEqualSign)

The keyboard code for the keypad = key.

### International Keys

[`let GCKeyInternational1: String`](/documentation/GameController/GCKeyInternational1)

The keyboard code for the first international key.

[`let GCKeyInternational2: String`](/documentation/GameController/GCKeyInternational2)

The keyboard code for the second international key.

[`let GCKeyInternational3: String`](/documentation/GameController/GCKeyInternational3)

The keyboard code for the third international key.

[`let GCKeyInternational4: String`](/documentation/GameController/GCKeyInternational4)

The keyboard code for the fourth international key.

[`let GCKeyInternational5: String`](/documentation/GameController/GCKeyInternational5)

The keyboard code for the fifth international key.

[`let GCKeyInternational6: String`](/documentation/GameController/GCKeyInternational6)

The keyboard code for the sixth international key.

[`let GCKeyInternational7: String`](/documentation/GameController/GCKeyInternational7)

The keyboard code for the seventh international key.

[`let GCKeyInternational8: String`](/documentation/GameController/GCKeyInternational8)

The keyboard code for the eighth international key.

[`let GCKeyInternational9: String`](/documentation/GameController/GCKeyInternational9)

The keyboard code for the ninth international key.

### Language Keys

[`let GCKeyLANG1: String`](/documentation/GameController/GCKeyLANG1)

The keyboard code for the first language key.

[`let GCKeyLANG2: String`](/documentation/GameController/GCKeyLANG2)

The keyboard code for the second language key.

[`let GCKeyLANG3: String`](/documentation/GameController/GCKeyLANG3)

The keyboard code for the third language key.

[`let GCKeyLANG4: String`](/documentation/GameController/GCKeyLANG4)

The keyboard code for the fourth language key.

[`let GCKeyLANG5: String`](/documentation/GameController/GCKeyLANG5)

The keyboard code for the fifth language key.

[`let GCKeyLANG6: String`](/documentation/GameController/GCKeyLANG6)

The keyboard code for the sixth language key.

[`let GCKeyLANG7: String`](/documentation/GameController/GCKeyLANG7)

The keyboard code for the seventh language key.

[`let GCKeyLANG8: String`](/documentation/GameController/GCKeyLANG8)

The keyboard code for the eighth language key.

[`let GCKeyLANG9: String`](/documentation/GameController/GCKeyLANG9)

The keyboard code for the ninth language key.

### Left- and Right-Side Keys

[`let GCKeyLeftControl: String`](/documentation/GameController/GCKeyLeftControl)

The keyboard code for the Control key on the left side of the keyboard.

[`let GCKeyLeftShift: String`](/documentation/GameController/GCKeyLeftShift)

The keyboard code for the Shift key on the left side of the keyboard.

[`let GCKeyLeftAlt: String`](/documentation/GameController/GCKeyLeftAlt)

The keyboard code for the Option or Alt key on the left side of the keyboard.

[`let GCKeyLeftGUI: String`](/documentation/GameController/GCKeyLeftGUI)

The keyboard code for the Command key on the left side of the keyboard.

[`let GCKeyRightControl: String`](/documentation/GameController/GCKeyRightControl)

The keyboard code for the Control key on the right side of the keyboard.

[`let GCKeyRightShift: String`](/documentation/GameController/GCKeyRightShift)

The keyboard code for the Shift key on the right side of the keyboard.

[`let GCKeyRightAlt: String`](/documentation/GameController/GCKeyRightAlt)

The keyboard code for the Option or Alt key on the right side of the keyboard.

[`let GCKeyRightGUI: String`](/documentation/GameController/GCKeyRightGUI)

The keyboard code for the Command key on the right side of the keyboard.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)