event_callback is called whenever a raw key event is received or when a pointer event occurs(only on touch input supported devices). There are three kinds of key events: EEventKeyDown, EEventKey, and EEventKeyUp. When a user presses a key down, events EEventKeyDown and EEventKey are generated. When the key is released, an EEventKeyUp event is generated.
Pointer events are generated by touch input supported devices. When the screen is touched the EButton1Down event is generated, EDrag while the finger/stylus is dragged across the screen and then EButton1Up when the finger/stylus is lifted.
The argument to the event_callback is a dictionary that contains the following data:
For key events:
•'type': one of EEventKeyDown, EEventKey, or EEventKeyUp
•'keycode': the keycode of the key
•'scancode': the scancode of the key
•'modifiers': the modifiers that apply to this key event