Arma 3 Scripting

Command in Interaction

inputAction

Also available as Markdown and JSON, or read the original wiki page.

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.

Syntax

inputAction name

Parameters:

Returns: Number

Examples

Example 1

inputAction "leanLeft";

Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.

Example 2

0 spawn {
    waitUntil {inputAction "reloadMagazine" > 0};
    hint "Reload Key Pressed";
};

See also

inputMouse · inputController · actionKeys · actionKeysImages · actionKeysNames · actionIDs · actionParams · addAction · setUserActionText · inGameUISetEventHandler · showHUD · removeAction · removeAllActions · action