Handling the Keyboard SDL Library Documentation Prev Chapter 3. It should make it a lot easier to understand this tutorial is you are familiar with the data types involved in keyboard access, so I'll explain them first. The full list of modifier symbols is here .
SDLMod values can be AND'd together to represent several modifiers.
The scancode field is hardware specific and should be ignored unless you know what your doing. The sym field is the SDLKey value of the key being pressed or released. The mod field describes the state of the keyboard modifiers at the time the key press or release occurred. Finally, the unicode field stores the 16-bit unicode value of the key. Unicode values only make sense on a key press because the unicode value describes an international character and only key presses produce characters.