<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FInput_Handler</id>
	<title>HPL3/SOMA/Scripting/Input Handler - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FInput_Handler"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Input_Handler&amp;action=history"/>
	<updated>2026-10-04T04:28:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Input_Handler&amp;diff=7256&amp;oldid=prev</id>
		<title>TiMan: Add a sourced SOMA guide with explanations and stock-script examples.</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Input_Handler&amp;diff=7256&amp;oldid=prev"/>
		<updated>2026-10-02T12:21:16Z</updated>

		<summary type="html">&lt;p&gt;Add a sourced SOMA guide with explanations and stock-script examples.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{shortPageTitle}}&lt;br /&gt;
&lt;br /&gt;
The SOMA script declarations for this interface reference are in &amp;lt;code&amp;gt;script/interfaces/InputHandler_Interface.hps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Trace an action from registration to callback ==&lt;br /&gt;
# Open &amp;lt;code&amp;gt;script/base/InputHandler.hps&amp;lt;/code&amp;gt; and find &amp;lt;code&amp;gt;CreateActions&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Compare the action name with its enum ID in the registration call below.&lt;br /&gt;
# Open &amp;lt;code&amp;gt;script/modules/InventoryHandler.hps&amp;lt;/code&amp;gt; and find &amp;lt;code&amp;gt;OnAction&amp;lt;/code&amp;gt;; then check the module’s &amp;lt;code&amp;gt;UseInputCallbacks&amp;lt;/code&amp;gt; entry in &amp;lt;code&amp;gt;config/Modules.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Follow the stock registration in &amp;lt;code&amp;gt;CreateActions&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;CreateAction(&amp;amp;quot;Jump&amp;amp;quot;, eAction_Jump, true, &amp;amp;quot;Movement&amp;amp;quot;)&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;if(alAction == eAction_OpenInventory &amp;amp;amp;&amp;amp;amp; abPressed)&amp;lt;/code&amp;gt;. In &amp;lt;code&amp;gt;Modules.cfg&amp;lt;/code&amp;gt;, that module has &amp;lt;code&amp;gt;UseInputCallbacks=&amp;amp;quot;true&amp;amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[HPL3/SOMA/Scripting|SOMA scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>