Video | Events | OpenGL | Audio | CD-ROM | Threads | Time
# Events
Introduction | Function Reference | Examples
The events managed by the application are simplified by SDL to six basic types: Activation Events Keyboard Events Mouse Motion Events Mouse Button Events Quit Events Window Hook Events You can ignore each of these event types, but except for the window hook event, they are filtered and posted to an internal event queue. Be careful of the code you put into the event filter function. The event filter may be run concurrently in a separate thread from your main code, and you should be aware of the various pitfalls of multi-threaded programming when writing filter functions. In general, the cleanest way to handle events is to read them from the event queue using `SDL_PollEvent()` and `SDL_WaitEvent()`. Event handling is started by calling `SDL_Init(SDL_INIT_VIDEO)`. Detailed examples can be found in the sample code.