InputState

Inheritance:

Methods of InputState:

__init__
def __init__(self)

Undocumented function.

_ignore
def _ignore(self, token)

Undo a watch(). Don't call this directly, call release() on the token that watch() returned.

_unforce
def _unforce(self, token)

Stop forcing a value. Don't call this directly, call release() on your token.

debugPrint
def debugPrint(self, message)

for debugging

delete
def delete(self)

Undocumented function.

force
def force(self, name, value, inputSource)

Force isSet(name) to return 'value'.
This returns a token; hold onto the token and call token.release() when you no longer want to force the state.
example: set up token=inputState.force('forward', True, inputSource='myForwardForcer') ... tear down token.release()

getEventName
def getEventName(self, name)

Undocumented function.

isSet
def isSet(self, name, inputSource=None)

returns True/False

releaseInputs
def releaseInputs(self, name)

Undocumented function.

set
def set(self, name, isActive, inputSource=None)

Undocumented function.

watch
def watch(self, name, eventOn, eventOff, startState=False, inputSource=None)

This returns a token; hold onto the token and call token.release() when you no longer want to watch for these events.
set up token = inputState.watch('forward', 'w', 'w-up', inputSource=inputState.WASD) ... tear down token.release()

watchWithModifiers
def watchWithModifiers(self, name, event, startState=False, inputSource=None)

Undocumented function.