Input scripting

Return to table of content.

List

Variables

Enumerations

Classes

Details

Variables

Return to top.

NameTypeDescription
ActionManagerInstance ActionManagerInstance of the action manager.

Enumerations

ActionState

Return to top.

Description:
State of an action code.

Values:
AS_KEY_DOWNKey must be down.
AS_KEY_UPKey must be up.
AS_MOUSE_BUTTON_DOWNMouse button must be down.
AS_MOUSE_BUTTON_UPMouse button must be up.

KeyCode

Return to top.

Description:
Key code.

Values:
KC_ESCAPEEscape key.
KC_RETURNReturn / Enter key (not on numeric keypad).
KC_LCONTROLLeft control key.
KC_RCONTROLRight control key.
KC_LSHIFTLeft shift key.
KC_RSHIFTRight shift key.
KC_LMENULeft menu/alt key.
KC_RMENURight menu/alt key.
KC_LWINLeft Windows key.
KC_RWINRight Windows key.
KC_APPSAppMenu key.
KC_TABTabulation key.
KC_F1"F1" key.
KC_F2"F2" key.
KC_F3"F3" key.
KC_F4"F4" key.
KC_F5"F5" key.
KC_F6"F6" key.
KC_F7"F7" key.
KC_F8"F8" key.
KC_F9"F9" key.
KC_F10"F10" key.
KC_F11"F11" key.
KC_F12"F12" key.
KC_F13"F13" key (NEC PC98).
KC_F14"F14" key (NEC PC98).
KC_F15"F15" key (NEC PC98).
KC_SCROLLLOCKScroll lock key.
KC_SYSRQSys rq / Print screen key.
KC_PAUSEPause key.
KC_NUMLOCKNumeric lock key.
KC_NUMPAD0"0" key (on numeric keypad).
KC_NUMPAD1"1" key (on numeric keypad).
KC_NUMPAD2"2" key (on numeric keypad).
KC_NUMPAD3"3" key (on numeric keypad).
KC_NUMPAD4"4" key (on numeric keypad).
KC_NUMPAD5"5" key (on numeric keypad).
KC_NUMPAD6"6" key (on numeric keypad).
KC_NUMPAD7"7" key (on numeric keypad).
KC_NUMPAD8"8" key (on numeric keypad).
KC_NUMPAD9"9" key (on numeric keypad).
KC_NUMPADMULTIPLY"*" key (on numeric keypad).
KC_NUMPADSUBTRACT"-" key (on numeric keypad).
KC_NUMPADADD"+" key (on numeric keypad).
KC_DIVIDE"/" key (on numeric keypad).
KC_NUMPADCOMMA"," key (on numeric keypad) (NEC PC98).
KC_NUMPADDECIMAL"." key (on numeric keypad).
KC_NUMPADEQUALS"=" key (on numeric pad) (NEC PC98).
KC_NUMPADENTEREnter / Return key (on numeric pad).
KC_ABNT_C2"." key (on numeric pad) (Portugese / Brazilian keyboards).
KC_1"1" key.
KC_2"2" key.
KC_3"3" key.
KC_4"4" key.
KC_5"5" key.
KC_6"6" key.
KC_7"7" key.
KC_8"8" key.
KC_9"9" key.
KC_0"0" key.
KC_MINUS"-" key.
KC_EQUALS"=" key.
KC_LBRACKET"[" key.
KC_RBRACKET"]" key.
KC_SEMICOLON";" key.
KC_APOSTROPHE"'" key.
KC_GRAVEAccent key.
KC_BACKSLASH"\ " key.
KC_COMMA"," key.
KC_PERIOD"." key.
KC_SLASH"/" key.
KC_AT"@" key (NEC PC98).
KC_COLON":" key (NEC PC98).
KC_UNDERLINE"_" key (NEC PC98).
KC_OEM_102"<"; ">" or "|" key (UK/Germany keyboards).
KC_CAPITALCapital/Caps lock key.
KC_INSERTInsert key (on arrow keypad).
KC_DELETEDelete key (on arrow keypad).
KC_HOMEHome key (on arrow keypad).
KC_ENDEnd key (on arrow keypad).
KC_PGUPPage up key (on arrow keypad).
KC_PGDOWNPage down key (on arrow keypad).
KC_UPUp arrow key (on arrow keypad).
KC_DOWNDown arrow key (on arrow keypad).
KC_LEFTLeft arrow key (on arrow keypad).
KC_RIGHTRight arrow key (on arrow keypad).
KC_BACKSPACEBackspace key.
KC_SPACESpace key.
KC_Q"q" key.
KC_W"w" key.
KC_E"e" key.
KC_R"r" key.
KC_T"t" key.
KC_Y"y" key.
KC_U"u" key.
KC_I"i" key.
KC_O"o" key.
KC_P"p" key.
KC_A"a" key.
KC_S"s" key.
KC_D"d" key.
KC_F"f" key.
KC_G"g" key.
KC_H"w" key.
KC_J"j" key.
KC_K"k" key.
KC_L"l" key.
KC_Z"z" key.
KC_X"x" key.
KC_C"c" key.
KC_V"v" key.
KC_B"b" key.
KC_N"n" key.
KC_M"m" key.
KC_STOPStop key (NEC PC98).
KC_PREVTRACKPrevious track key.
KC_NEXTTRACKNext track key.
KC_MUTEMute key.
KC_CALCULATORCalculator key.
KC_PLAYPAUSEPlay / pause key.
KC_MEDIASELECTMedia select key.
KC_MEDIASTOPMedia stop key.
KC_VOLUMEDOWNVolume - key.
KC_VOLUMEUPVolume + key.
KC_MYCOMPUTERMy computer key.
KC_MAILMail key.
KC_WEBHOMEWeb home key.
KC_WEBSEARCHWeb search key.
KC_WEBFAVORITESWeb favorites key.
KC_WEBREFRESHWeb refresh key.
KC_WEBSTOPWeb stop key.
KC_WEBFORWARDWeb forward key.
KC_WEBBACKWeb back key.
KC_POWERSystem power key.
KC_SLEEPSystem sleep key.
KC_WAKESystem wake key.
KC_KANAKana key (Japanese keyboards).
KC_ABNT_C1ABNT C1 key (Portugese / Brazilian keyboards).
KC_CONVERTConvert key (Japanese keyboards).
KC_NOCONVERTNo convert key (Japanese keyboards).
KC_YENYen key (Japanese keyboards).
KC_KANJIKanji key (Japanese keyboards).
KC_AXAX key.
KC_UNLABELEDUnlabeled key (J3l00).

MouseButton

Return to top.

Description:
Mouse button.

Values:
MBTN_LEFTLeft button.
MBTN_RIGHTRight button.
MBTN_MIDDLEMiddle button.
MBTN_BUTTON3Third button.
MBTN_BUTTON4Fourth button.
MBTN_BUTTON5Fifth button.
MBTN_BUTTON6Sixth button.
MBTN_BUTTON7Seventh button.

Classes

ActionManager

Return to top.

Description:
Manager responsible of all the input bindings.
constructor
Description:
ActionManager cannot be instanciated by a script.
declareAction
Description:
Declare an action and its default associated input value and state.

Parameters:
NameTypeDescription
idintegerIdentifier of the action.
default_valueActionCodeValue associated to the action (either a KeyCode or a MouseButton).
default_value_stateActionStateState of the value needed to trigger to action..

Return:
reAssignAction
Description:
Re-assign the input value and the state of an existing action.

Parameters:
NameTypeDescription
idintegerIdentifier of the action.
valueActionCodeValue associated to the action (either a KeyCode or a MouseButton).
value_stateActionStateState of the value needed to trigger to action..

Return:
actionTriggered
Description:
Check if an action has been triggered.

Parameters:
NameTypeDescription
idintegerIdentifier of the action.

Return:
getPointerPosition
Description:
Get the position of the pointer along an axis.

Parameters:
NameTypeDescription
axisinteger0 for x-axis; 1 for y-axis; 2 for z-axis (wheel).
relativebooltrue to return the position relative to the last known position; false to return the absolute value.

Return: