KeyCode
A keyboard key, identified by SDL's key code.
A key code names the label a key carries under the active keyboard layout, so A is the key that types a, wherever it sits. Use key codes for text and prompts ("press Q to quit"); use Scancode for controls that depend on where a key sits, such as movement. toScancode finds the key that carries a label now.
Key codes are sparse (printable keys use their Unicode value, the rest have a high bit set), so do not size arrays by them; index by Scancode instead.
Types
Properties
Functions
Link copied to clipboard
Returns the scancode of the key that types this key code under the current keyboard layout, or Scancode.UNKNOWN when no key on the layout produces it.