Input Handler
The SOMA script declarations for this interface reference are in script/interfaces/InputHandler_Interface.hps.
The Input Handler creates named input actions and their bindings. Its CreateActions includes movement, Jump, Crouch, Run, Interact, Flashlight, menu actions and analog gamepad actions. Stock modules receive action IDs and a pressed/released flag through OnAction when configured to receive input callbacks.
Trace an action from registration to callback
- Open
script/base/InputHandler.hpsand findCreateActions. - Compare the action name with its enum ID in the registration call below.
- Open
script/modules/InventoryHandler.hpsand findOnAction; then check the module’sUseInputCallbacksentry inconfig/Modules.cfg.
Follow the stock registration in CreateActions: CreateAction("Jump", eAction_Jump, true, "Movement") creates the Jump action. A receiving module uses the enum ID rather than comparing the action’s text name. The inventory module demonstrates this with if(alAction == eAction_OpenInventory && abPressed). In Modules.cfg, that module has UseInputCallbacks="true".