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

Cannot register keybind with a default custom control #1378

Closed
mattysmith22 opened this issue Oct 14, 2020 · 0 comments · Fixed by #1379
Closed

Cannot register keybind with a default custom control #1378

mattysmith22 opened this issue Oct 14, 2020 · 0 comments · Fixed by #1379
Assignees
Labels

Comments

@mattysmith22
Copy link
Contributor

Mods

  • Arma 3: 1.98 146373
  • CBA: 3.1.5
    Description:

Using CBA_fnc_addKeybind you can map custom user actions 1-5 on to a control, but if you try 6-20 it will fail due to it being incorrectly verified as out of bounds for DIK codes (not taking into account the extra ones added for the user actions for joystick compatibility.)

The issue is with this line

It may also be worth documenting those custom controls somewhere too in existing documentation.

Steps to reproduce:

["testMod"
    , "workingBind"
    , "This one is mapped"
    , {hint "works!"}
    , {}
    , [0xFE, [false, false, false]] //Custom user action 5
] call CBA_fnc_addKeybind;

["testMod"
    , "brokenBind"
    , "This one is not mapped"
    , {hint "Doesn't work"}
    , {}, [0xFF, [false, false, false]] //Custom user action 6
] call CBA_fnc_addKeybind;

Expected behaviour:
Keybind "This one is mapped" and "This one is not mapped" should be mapped to custom user actions 5 and 6 respectively.

Where did the issue occur?

  • Any location where you try to map the keybind

Log Files:
https://gist.github.com/mattysmith22/a49f9060c2334f7214c8d9575bc16dbf
Specific focus on the following line:

12:05:10 [CBA] (keybinding) WARNING: Keybind testmod$brokenbind's default keybind is invalid [DIK: 255]

Additional context:
This was found while migrating a mod (AH-64D apache) from old custom controls to new CBA keybinds due to some people having issues with conflicts. This was intended to provide seamless backwards compatibility.

@mattysmith22 mattysmith22 changed the title Cannot register keybind with a default Cannot register keybind with a default custom control Oct 14, 2020
@commy2 commy2 self-assigned this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants