Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.03 KB

File metadata and controls

38 lines (28 loc) · 1.03 KB

tcod.event - SDL2 Event Handling

.. automodule:: tcod.event
    :members:
    :member-order: bysource
    :exclude-members:
        KeySym, Scancode, Modifier, get, wait


Getting events

The primary way to capture events is with the :any:`tcod.event.get` and :any:`tcod.event.wait` functions. These functions return events in a loop until the internal event queue is empty. Use :func:`isinstance`, :any:`tcod.event.EventDispatch`, or match statements (introduced in Python 3.10) to determine which event was returned.

.. autofunction:: tcod.event.get
.. autofunction:: tcod.event.wait

Keyboard Enums

.. autoclass:: KeySym
    :members:

.. autoclass:: Scancode
    :members:

.. autoclass:: Modifier
    :members:
    :member-order: bysource
    :undoc-members: