Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.
Keyboard
Handles keyboard operations
Operations
GetModState # function
Get the current key modifier state for the keyboard
function : GetModState() ~ KeymodReturn
| Type | Description |
|---|---|
| Keymod | OR'd combination of the modifier keys for the keyboard |
GetState # function
Get a snapshot of the current state of the keyboard
function : GetState() ~ Byte[]Return
| Type | Description |
|---|---|
| Byte | pointer to an array of key states. A value of 1 means that the key is pressed and a value of 0 means that it is not. Indexes into this array are obtained by using SDL_Scancode values |