CBA_fnc_addKeyHandler

Description

Adds an action to a keybind.

Parameters

_keyKey (DIK-Code) to attach action to.  <NUMBER>
_settingsShift, Ctrl, Alt required.  (default: [false, false, false]) ARRAY
_codeCode to execute upon event.  <CODE>
_type”keydown” or “keyup”.  [optional] (default: “keydown”) STRING
_hashKeyKey handler identifier.  Randomly generated if not supplied.  [optional] STRING
_allowHoldWill the key fire every frame while hold down?  [optional] (default: true) <BOOLEAN>
_holdDelayHow long after keydown will the key event fire, in seconds.  [optional] <NUMBER>

Returns

_hashKeyKey handler identifier.  Used to remove or change the key handler.  STRING

Examples

_id = [47, [true, false, false], {_this call myAction}] call CBA_fnc_addKeyHandler;

Author

Sickboy, commy2

Array to read from [Array]
string used by format
Close