AccessEngine :: AEDevice :: AEInput :: SystemInput :: SystemInput :: Class SystemInput
[hide private]
[frames] | no frames]

Class SystemInput

source code

                     object --+        
                              |        
AEUserInterface.AEUserInterface --+    
                                  |    
                       Base.AEInput --+
                                      |
                                     SystemInput

Abstract base class for input devices that are used by both SUE and the OS. Provides an interface for registering modifier actions that can be used to indicate the start of commands intended for SUE. Also provides an interface for registering filtered GestureLists that indicate which combination of Gestures should not be passed to other applications. The definition of what constitues a valid Gesture and GestureList is left to a subclass. The decision as to when registered Gestures are filtered or not is determined by a mode managed in this class via getFilterMode and setFilterMode.

This class is abstract as some of the methods inherited from Base.AEInput are not overridden and raise NotImplementedError.

Instance Methods [hide private]
 
__init__(self)
Initializes the filters to an empty list, the modifiers to an empty dictionary, and the filtering mode to none.
source code
list of string
getCapabilities(self)
Returns: 'system input' as the only capability of this device.
source code
integer
getFilterMode(self)
Gets the current filter mode.
source code
 
setFilterMode(self, mode)
Stores the current filter mode.
source code
 
addModifier(self, code)
Adds an action code to the modifiers dictionary to identify it as a modifier for other actions.
source code
 
removeModifier(self, code)
Removes an action code from the modifiers dictionary if it is no longer in use.
source code
 
clearModifiers(self)
Removes all modifiers by destroying the modifiers dictionary and recreating it.
source code
 
addFilter(self, gestures)
Abstact method.
source code
 
removeFilter(self, gestures)
Abstract method.
source code
 
clearFilters(self)
Abstract method.
source code
 
resetState(self)
Abstract method.
source code

Inherited from Base.AEInput: addInputListener, addKeyCmd, asString, close, getMaxActions, init, inputListenersExist, removeInputListener, removeKeyCmd, sortGesture

Inherited from Base.AEInput (private): _notifyInputListeners

Inherited from AEUserInterface.AEUserInterface: getClassName, getDescription, getName, getPath

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
integer filter_mode
Mode that determines which Gestures are filtered
dictionary modifiers
Dictionary of action codes that are considered modifiers

Inherited from Base.AEInput: listeners, ready

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initializes the filters to an empty list, the modifiers to an empty dictionary, and the filtering mode to none.
Overrides: Base.AEInput.__init__

getCapabilities(self)

source code 

Gets a list of strings representing the capabilities of this device. Typical output capabilities include "system input," "braille," "switch," etc. though others are certainly possible.

The AEDeviceManager will only load a device if another device doesn't already provide all of its capabilities.
Returns: list of string
'system input' as the only capability of this device.
Overrides: Base.AEInput.getCapabilities

getFilterMode(self)

source code 
Gets the current filter mode.
Returns: integer
Current filter mode

setFilterMode(self, mode)

source code 
Stores the current filter mode.
Parameters:
  • mode (integer) - Current filter mode

addModifier(self, code)

source code 
Adds an action code to the modifiers dictionary to identify it as a modifier for other actions.
Parameters:
  • code (integer) - Action code to register as a modifier

removeModifier(self, code)

source code 
Removes an action code from the modifiers dictionary if it is no longer in use. Otherwise, it decrements the reference count.
Parameters:
  • code (integer) - Action code to unregister as a modifier

addFilter(self, gestures)

source code 
Abstact method. Adds a GestureList as a filter to this device. A filter typically indicates input that should be consumed and prevented from reaching other applications. Exactly how the filter is stored and used is determined by a subclass.
Parameters:
Raises:
  • NotImplementedError - When this method is not overridden by a subclass

removeFilter(self, gestures)

source code 
Abstract method. Removes a GestureList as a filter from this device. A filter typically indicates input that should be consumed and prevented from reaching other applications. How the filter is removed is determined by a subclass.
Parameters:
Raises:
  • NotImplementedError - When this method is not overridden by a subclass

clearFilters(self)

source code 
Abstract method. Removes all GestureList filters from the device. How the filters are removed is determined by a subclass. A filter typically indicates input that should be consumed and prevented from reaching other applications. Exactly How the filter is removed is determined by a subclass.
Raises:
  • NotImplementedError - When this method is not overridden by a subclass

resetState(self)

source code 
Abstract method. Resets the state of the input device.
Raises:
  • NotImplementedError - When not overridden in a subclass