Class SDL.Keysym

Description

The Keysym class is used to report key presses and releases. It's available from the SDL.Event class for keyboard events.


Variable mod

int SDL.Keysym.mod

Description

Current key modifiers

mod stores the current state of the keyboard modifiers as explained in SDL.get_mod_state().


Variable scancode

int SDL.Keysym.scancode

Description

Hardware specific scancode

The scancode field should generally be left alone - it is the hardware dependent scancode returned by the keyboard.


Variable sym

int SDL.Keysym.sym

Description

SDL virtual keysym

The sym field is extremely useful. It is the SDL-defined value of the key. This field is very useful when you are checking for certain key presses.


Variable unicode

int SDL.Keysym.unicode

Description

Translated character

The unicode field is only used when UNICODE translation has beed enabled with SDL.enable_unicode(). If unicode is non-zero then this the UNICODE character corresponding to the keypress.

Note

UNICODE translation does have a slight overhead so don't enable it unless its needed.