Home | Trees | Indices | Help |
|
---|
|
This module handles user input.
To handle user input you will likely want to use the event.get function or create a subclass of event.App.
But there are other options such as event.keyWait and event.isWindowClosed.
A few event attributes are actually string constants. Here's a reference for those:
'QUIT', 'KEYDOWN', 'KEYUP', 'MOUSEDOWN', 'MOUSEUP', or 'MOUSEMOTION.'
'LEFT', 'MIDDLE', 'RIGHT', 'SCROLLUP', 'SCROLLDOWN'
'NONE', 'ESCAPE', 'BACKSPACE', 'TAB', 'ENTER', 'SHIFT', 'CONTROL', 'ALT', 'PAUSE', 'CAPSLOCK', 'PAGEUP', 'PAGEDOWN', 'END', 'HOME', 'UP', 'LEFT', 'RIGHT', 'DOWN', 'PRINTSCREEN', 'INSERT', 'DELETE', 'LWIN', 'RWIN', 'APPS', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'KP0', 'KP1', 'KP2', 'KP3', 'KP4', 'KP5', 'KP6', 'KP7', 'KP8', 'KP9', 'KPADD', 'KPSUB', 'KPDIV', 'KPMUL', 'KPDEC', 'KPENTER', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'NUMLOCK', 'SCROLLLOCK', 'SPACE', 'CHAR'
Classes | |
Event Base Event class. |
|
Quit Fired when the window is closed by the user. |
|
KeyEvent | |
KeyDown Fired when the user presses a key on the keyboard or a key repeats. |
|
KeyUp Fired when the user releases a key on the keyboard. |
|
MouseButtonEvent | |
MouseDown Fired when a mouse button is pressed. |
|
MouseUp Fired when a mouse button is released. |
|
MouseMotion Fired when the mouse is moved. |
|
App Application framework. |
Functions | |||
iterator |
|
||
Event or None |
|
||
|
|||
KeyDown |
|
||
|
|||
boolean |
|
Function Details |
Flushes the event queue and returns the list of events. This function returns Event objects that can be identified by their type attribute or their class. |
Wait for an event.
Since: 1.4.0 |
Push an event into the event buffer. |
Waits until the user presses a key. Then returns a KeyDown event. Key events will repeat if held down. A click to close the window will be converted into an Alt+F4 KeyDown event.
|
Change or disable key repeat.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat May 28 16:09:37 2016 | http://epydoc.sourceforge.net |