Module MyControlKeys :: Class MY_SingleControlKeys
[hide private]
[frames] | no frames]

Class MY_SingleControlKeys

source code

object --+
         |
        MY_SingleControlKeys

singleton class to control the keyboard input

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
initControlKeys(self, controller)
set sensors to the right variables
source code
 
setControlKeys(self)
reads ascii key values from the config list and sets it to the right memeber variables
source code
 
setControlKeysEffect(self, plane=0, opposite=False)
change key assignments dependent on which plane is in use; normal use without any effect just call this method without any parameters
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, *args, **kargs) source code
Class Variables [hide private]
  __instance = None
Instance Variables [hide private]
SCA_KeyboardSensor BWD
keyboard sensor which listens to a specific keystroke
Integer BWD_key
ascii code of the keystroke for backward movement
SCA_KeyboardSensor DWD
keyboard sensor which listens to a specific keystroke
Integer DWD_key
ascii code of the keystroke for downward movement
SCA_KeyboardSensor DXR
keyboard sensor which listens to a specific keystroke
Integer DXR_key
ascii code of the keystroke for dexter movement
SCA_KeyboardSensor FWD
keyboard sensor which listens to a specific keystroke
Integer FWD_key
ascii code of the keystroke for forward movement
SCA_KeyboardSensor SNL
keyboard sensor which listens to a specific keystroke
Integer SNL_key
ascii code of the keystroke for sinsitral movement
SCA_KeyboardSensor UWD
keyboard sensor which listens to a specific keystroke
Integer UWD_key
ascii code of the keystroke for upward movement
Boolean init
True if controlkeys were initialized
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(self, *args, **kargs)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

initControlKeys(self, controller)

source code 

set sensors to the right variables

Parameters:
  • controller (SCA_IController) - the controller on which the keyboard sensors are connected to

setControlKeysEffect(self, plane=0, opposite=False)

source code 

change key assignments dependent on which plane is in use; normal use without any effect just call this method without any parameters

Parameters:
  • plane (Integer [0,1,2]) - the plane number on which the user is right now
  • opposite (Boolean) - whether it is the up or down on the specific plane