{"name":"actionKeysNames","title":"actionKeysNames","type":"command","url":"https://community.bistudio.com/wiki/actionKeysNames","revid":364173,"updated":"2024-05-05T10:46:45Z","groups":["Interaction"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns a list of button names assigned to the given user action.\nAction names can be found in config class `ControllerSchemes` or user action names.","syntaxes":[{"syntax":"actionKeysNames userAction","params":[{"name":"userAction","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"userAction"}},{"syntax":"actionKeysNames [userAction, maxKeys, inputDevicePriority]","params":[{"name":"userAction","type":"String","type_expr":"String"},{"name":"maxKeys","type":"Number","description":"maximum number of keys to return","type_expr":"Number"},{"name":"inputDevicePriority","type":"String","description":"result sorted by inputDevicePriority with values:\n\n- `\"Mouse\"`\n- `\"Keyboard\"`\n- `\"Stick\"`\n- `\"Gamepad\"`\n- `\"Tracker\"`\n- `\"Combo\"` (mouse and keyboard combinations)\n- `\"Controler\"` [sic] (any controller other than mouse or keyboard)\n\nOther values are considered as:\n\n- `\"Unsorted\"`","type_expr":"String","since":"arma3 1.36"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[userAction, maxKeys, inputDevicePriority]"}}],"examples":[{"code":["_list = actionKeysNames \"ReloadMagazine\"; // \"\"\"R\"\" or \"\"XBox X\"\"\""]}],"see_also":["actionKeys","actionKeysImages","actionKeysNamesArray","actionName","inputAction"],"notes":[{"user":"WGL.Q","date":"2010-01-20T20:14:00Z","text":"The return type is a stacked string. A string inside a string. To compare use first single and inside double quotes:\n\n```sqf\nif (actionKeysNames \"User1\" == '\"W\"') then { /* ... */ };\n```"}]}