Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CBA_fnc_addKeybind and custom controls #1379

Merged
merged 1 commit into from
Dec 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion addons/keybinding/fnc_addKeybind.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,27 @@ Description:
0xF8: Mouse wheel up
0xF9: Mouse wheel down

0xFA: Custom user action 1
0xFB: Custom user action 2
0xFC: Custom user action 3
0xFD: Custom user action 4
0xFE: Custom user action 5
0xFF: Custom user action 6
0x100: Custom user action 7
0x101: Custom user action 8
0x102: Custom user action 9
0x103: Custom user action 10
0x104: Custom user action 11
0x105: Custom user action 12
0x106: Custom user action 13
0x107: Custom user action 14
0x108: Custom user action 15
0x109: Custom user action 16
0x10A: Custom user action 17
0x10B: Custom user action 18
0x10C: Custom user action 19
0x10D: Custom user action 20

Parameters:
_addon - Name of the registering mod + optional sub-category <STRING, ARRAY>
_action - Id of the key action. <STRING>
Expand Down Expand Up @@ -103,7 +124,7 @@ if (!(_upCode isEqualType {})) then {
_defaultKeybind params [["_defaultKey", 0, [0]], ["_defaultModifiers", [], [[]]]];
_defaultModifiers params [["_defaultShift", false, [false]], ["_defaultControl", false, [false]], ["_defaultAlt", false, [false]]];

if (_defaultKey >= 255) then {
if (_defaultKey > 0x10D) then {
WARNING_2("Keybind %1's default keybind is invalid [DIK: %2]",_action,_defaultKey);
_defaultKey = 0;
};
Expand Down