| Trees | Indices | Help |
|
|---|
|
|
AccessEngine.AEInput.SystemInput --+
|
Keyboard
Basic keyboard input device.
Has a reference to the AEEventManager to register for system wide keyboard key press and key release events. Matches key presses against a collection of stored AEInput.Gestures representing key combinations that should be filtered before they can reach the window with the input focus. Observers of this device are notified about AEInput.Gestures when one or more press events are received followed by a release.
Instances of Keyboard impose some constraints on the filters that can be registered. A filter can contain at most one AEInput.Gesture and that AEInput.Gesture may have at most MAX_KEY_CHORD key codes and at least one. The filtered gesture may start with zero, one, or two modifiers registered via SystemInput.addModifier and must end with exactly one non-modifier.
The Keyboard device is robust against typomatic repeats and more than MAX_KEY_CHORD sustained presses. Typomatic repeats are ignored so that holding two modifier keys, holding a typomatic key, releasing one of the modifiers, and then releasing the typomatic key does not result in two notifications. Key presses beyond the maximum number are also ignored without affecting the current state.
|
|||
|
|||
|
|||
| list of string |
|
||
|
|||
|
|||
|
|||
| integer |
|
||
| string |
|
||
|
|||
|
|||
| boolean |
|
||
| boolean |
|
||
|
|||
|
|||
|
|||
|
|||
| callable |
|
||
| callable |
|
||
| callable |
|
||
| callable |
|
||
|
|||
|
|||
|
|||
| string |
|
||
|
|||
| list of integer |
ACC_KEYS Key codes for keys that should never be consumed because they activate accessibility features such as slow keys or sticky keys |
||
| list of AEInput.Gesture |
EATEN_GESTURES List of gestures commonly eaten by a party higher than this device in the AT-SPI event chain (e.g. |
||
| list of integer |
LOCK_KEYS Key codes for keys that can be locked in a particular state, namely AEK_CAPS_LOCK, AEK_SCROLL_LOCK, and AEK_NUM_LOCK. |
||
pyatspi.Registry
|
acc_reg Reference to the pyatspi.Registry
|
||
| AEInput.Gesture |
curr_gesture Actions seen so far that might form a filtered AEInput.Gesture |
||
| dictionary keyed by AEInput.Gestures |
filters Registered AEInput.GestureList filters keyed by the one and only one AEInput.Gesture allowed in each filter |
||
| boolean |
last_press Was the last event a press (True) or release (False)? |
||
| callable |
state Current state method for the key event handling state machine |
||
| list |
synth_press Ordered list of synthesized key presses that have been sent for processing and should be ignored when detected |
||
| list |
synth_release Ordered list of synthesized key releases that have been sent for processing and should be ignored when detected |
||
|
|||
pyatspi. Sets the filtering mode to handled by default. Also
registers for window activate events to account for missing keys caused
by system wide hotkey presses.
|
|
|
Adds a AEInput.GestureList to the collection of filters. The fire AEInput.Gesture in the AEInput.GestureList will be used when the mode is set to filter handled to prevent keys consumed by SUE from reaching the foreground application. The Keyboard input device only supports one AEInput.Gesture per filter, not a sequence of AEInput.Gestures, and only one non-modifier key code per AEInput.Gesture chord. Any AEInput.GestureList breaking these rules will cause this method to raise a ValueError.
|
|
|
|
|
|
|
|
|
|
Represents a state where the current key codes in curr_gesture and the next key press may lead to a match on one of the registered filters. The actions in this state are as follows. If the event is a press or release of one of the registered SystemInput.modifiers, the key is consumed and we remain in this state. If the event is a press of a non-modifier and the curr_gesture matches one of the registered filters, we consume the key and transition to _stateMatch. If the event is anything else, we synthesize all keys in the curr_gesture, consume the current event, and transition to _stateInvalid.
|
Represents a state where the current key codes in curr_gesture and the next key event is not likely to match one of the registered filters. The actions in this state are as follows. If the event is a press resulting in the curr_gesture having only SystemInput.modifiers in it, we consume the press and transition to _statePossible. If the event is a press resulting in the curr_gesture exactly matching one of the registered filters, we consume the press transition to _stateMatch. If the event is anything else, we allow the event to pass and stay in this state.
|
Represents a state where the current key codes in curr_gesture matches one of the filters and the next event may determine if the key codes in curr_gesture are consumed forever or synthesized to be passed on to the OS. The actions in this state are as follows. If the event is a press and curr_gesture matches one of the filters, we stay in this state. (This case is needed to handle repeating, typomatic presses of non-modifier keys.) If the event is a press and curr_gesture no longer matches one of the filters, we synthesize key presses for all keys in curr_gesture, consume the current press, and transition to _stateInvalid. If the event is a release of one of the SystemInput.modifiers, we consume the release and move to _stateAfterMatch. If the event is anything else (i.e. a non-modifier release), we consume the key and transition to _statePossible.
|
Represents a state where the the keys in curr_gesture just matched one of the filters and the next event was a release of one of the modifier keys instead of the non-modifier. This state is needed to avoid typomatic repeat presses of the still held non-modifier key. The actions in this state are as follows. If the event is a release of a non-modifier and the curr_gesture is now empty, we consume the release and move to _stateInvalid. If the event is a release of one of the non-modifiers and the curr_gesture still contains key strokes (e.g. SystemInput.modifiers), we consume the release and move to _statePossible.
|
|
|
|
|
|
|||
EATEN_GESTURESList of gestures commonly eaten by a party higher than this device in the AT-SPI event chain (e.g. the window manager). This device should not synthesize these gestures when detected.
|
LOCK_KEYSKey codes for keys that can be locked in a particular state, namely AEK_CAPS_LOCK, AEK_SCROLL_LOCK, and AEK_NUM_LOCK. These are constant.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Mon Jun 30 13:06:01 2008 | http://epydoc.sourceforge.net |