{"name":"inputAction","operator":null,"title":"inputAction","type":"command","url":"https://community.bistudio.com/wiki/inputAction","revid":369187,"updated":"2024-09-03T10:34:46Z","groups":["Interaction"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Return the state of input devices mapped to given input action.\n\nFor Arma 3 inputActions and its bindings see: inputAction/actions.\n\nFor earlier Arma editions  see Category:Key Actions.","syntaxes":[{"syntax":"inputAction name","since":null,"effect":null,"exec":null,"params":[{"name":"name","type":"String","optional":false,"default":null,"description":"name of the action","types":["String"],"since":null,"text":"name: String - name of the action"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"unary","operator":null,"left":null,"right":{"text":"name","types":["String"]}}],"examples":[{"text":"```sqf\ninputAction \"leanLeft\";\n```\n\n Returns 1 if the button mapped to \"leanLeft\" is pressed currently else 0.","code":["inputAction \"leanLeft\";"]},{"text":"```sqf\n0 spawn {\n    waitUntil {inputAction \"reloadMagazine\" > 0};\n    hint \"Reload Key Pressed\";\n};\n```","code":["0 spawn {\n\twaitUntil {inputAction \"reloadMagazine\" > 0};\n\thint \"Reload Key Pressed\";\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["inputMouse","inputController","actionKeys","actionKeysImages","actionKeysNames","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","removeAction","removeAllActions","action"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Interaction","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}