From Bohemia Interactive Community
Revision as of 00:09, 14 May 2023 by Lou Montana (talk | contribs) (Text replacement - ">Posted on July ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-07-$1")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description


Return the state of input devices mapped to given input action.
For Arma 3 inputActions and its bindings see: inputAction/actions.
For earlier Arma editions see Category:Key Actions.


inputAction name
name: String - name of the action
Return Value:


Example 1:
inputAction "leanLeft";
Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.
Example 2:
[] spawn { waitUntil {inputAction "reloadMagazine" > 0}; hint "Reload Key Pressed"; };

Additional Information

See also:
inputMouse inputController actionKeys actionKeysImages actionKeysNames actionIDs actionParams addAction setUserActionText inGameUISetEventHandler showHUD removeAction removeAllActions action


Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 07:38, 15 October 2010 (CEST)
This command also returns values other than 0 and 1 (like 0.02 or 1.3). Any value greater than zero usually signals that the key or button is pressed. inputAction does not work reliably when used in RscDisplayMission's onKeyDown event handler (the same is probably true for other input related event handlers).
Posted on 2014-05-08 - 15:18 (UTC)
inputAction does not return the actual state of the queried key when a dialog screen is open. Instead, it will always return 0.
Posted on 2015-07-31 - 05:33 (UTC)
Waffle SS.
inputAction is capable of returning the state of analog inputs. This includes mouse, joystick, and even TrackIR. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be > 1.

Right mouse click is currently not supported, but right mouse hold is: