CBA_fnc_getKeybind

Description

Checks if a particular mod has already registered a keybind handler for the specified action.

Parameters

_modNameName of the registering mod [String]
_actionNameName of the action to get [String]

Returns

Keyboard entryarray of parameters of the same form as used for CBA_fnc_addKeybind

Examples

_entry = ["your_mod", "openMenu"] call CBA_fnc_getKeybind;

if (!isNil "_entry") then {
    _modName     = _entry select 0; // Name of the registering mod ("your_mod")
    _actionName  = _entry select 1; // Id of the key action ("openMenu")
    _displayName = _entry select 2; // Pretty name for the key action or an array with ["pretty name", "tool tip"]
    _downCode    = _entry select 3; // Code to execute on keyDown
    _upCode      = _entry select 4; // Code to execute on keyUp
    _firstKeybind= _entry select 5; // [DIK code, [shift, ctrl, alt]] (Only the first one)
    _holdKey     = _entry select 6; // Will the key fire every frame while held down? (bool)
    _holdDelay   = _entry select 7; // How long after keydown will the key event fire, in seconds (float)
    _keybinds    = _entry select 8; // All keybinds (array)
};

Author

Taosenai

Close