Tao.Sdl SDK Documentation

Sdl.SDL_KeyboardEvent Structure

Keyboard event structure

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

System.Object
   System.ValueType
      Tao.Sdl.Sdl.SDL_KeyboardEvent

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

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

SDL_KeyboardEvent is a member of the Sdl.SDL_Event union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported.

The type and state actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (type=SDK_KEYUP or state=SDL_RELEASED) and when a key is pressed (type=SDL_KEYDOWN or state=SDL_PRESSED). The information on what key was pressed or released is in the Sdl.SDL_keysym structure.

Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see SDL_EnableKeyRepeat).

Struct in SDL_events.h

            typedef struct{
                    Uint8 type;
                    Uint8 state;
                    SDL_keysym keysym;
                } SDL_KeyboardEvent;
            

Requirements

Namespace: Tao.Sdl

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

See Also

Sdl.SDL_KeyboardEvent Members | Tao.Sdl Namespace | Sdl.SDL_Event | Sdl.SDL_keysym | SDL_EnableKeyRepeat | SDL_EnableUNICODE