| | |
- InputEvent
-
- BrailleEvent
- KeyboardEvent
- MouseButtonEvent
- MouseMotionEvent
- SpeechEvent
- InputEventHandler
class InputEvent |
| | |
Methods defined here:
- __init__(self, type)
- Creates a new input event of the given type.
Arguments:
- type: the input event type (one of KEYBOARD_EVENT, BRAILLE_EVENT,
MOUSE_BUTTON_EVENT, MOUSE_MOTION_EVENT, SPEECH_EVENT).
|
class InputEventHandler |
| | |
Methods defined here:
- __init__(self, function, description, learnModeEnabled=True)
- Creates a new InputEventHandler instance. All bindings
(e.g., key bindings and braille bindings) will be handled
by an instance of an InputEventHandler.
Arguments:
- function: the function to call with an InputEvent instance as its
sole argument. The function is expected to return True
if it consumes the event; otherwise it should return
False
- description: a localized string describing what this InputEvent
does
- learnModeEnabled: if True, the description will be spoken and
brailled if learn mode is enabled. If False,
the function will be called no matter what.
- processInputEvent(self, script, inputEvent)
- Processes an input event. If settings.learnModeEnabled is True,
this will merely report the description of the input event to braille
and speech. If settings.learnModeEnabled is False, this will call the
function bound to this InputEventHandler instance, passing the
inputEvent as the sole argument to the function.
This function is expected to return True if it consumes the
event; otherwise it is expected to return False.
Arguments:
- script: the script (if any) associated with this event
- inputEvent: the input event to pass to the function bound
to this InputEventHandler instance.
|
|