Tao.Sdl SDK Documentation

Sdl.SDL_keysym Structure

The SDL_keysym structure describes a key press or a key release.

For a list of all members of this type, see Sdl.SDL_keysym Members.

System.Object
   System.ValueType
      Tao.Sdl.Sdl.SDL_keysym

[Visual Basic]
Public Structure Sdl.SDL_keysym
[C#]
public struct Sdl.SDL_keysym

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The SDL_keysym structure describes a key press or a key release. 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. So a value of KMOD_NUM | KMOD_CAPS | KMOD_LSHIFT would mean that Numlock, Capslock and the left shift key were all press (or enabled in the case of the lock keys). Finally, the unicode field stores the 16-bit unicode value of the key.

Note: It should be noted and understood that this field is only valid when the SDL_keysym is describing a key press, not a key release. Unicode values only make sense on a key press because the unicode value describes an international character and only key presses produce characters. More information on Unicode can be found at www.unicode.org

Note: Unicode translation must be enabled using the SDL_EnableUNICODE function.

Struct in SDL_keyboard.h

                typedef struct{
                    Uint8 scancode;
                    SDLKey sym;
                    SDLMod mod;
                    Uint16 unicode;
                } SDL_keysym;
                

Requirements

Namespace: Tao.Sdl

Assembly: Tao.Sdl (in Tao.Sdl.dll)

See Also

Sdl.SDL_keysym Members | Tao.Sdl Namespace