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

CBA Keybinding: delete key doesn't execute code when the ingame map is open #880

Closed
Timi007 opened this issue Jan 26, 2018 · 2 comments · Fixed by #890
Closed

CBA Keybinding: delete key doesn't execute code when the ingame map is open #880

Timi007 opened this issue Jan 26, 2018 · 2 comments · Fixed by #890
Labels
Milestone

Comments

@Timi007
Copy link
Contributor

Timi007 commented Jan 26, 2018

Arma 3 Version: 1.80.143869
CBA Version: 3.6.1.180131

Mods:

- CBA_A3

Description:

  • Normally keys assined with the CBA keybinding function will execute the given code even if the ingame map is open. However, if the delete key (DIK Code: 0xD3 or 211) is assigned (with or without modifiers), the code will not be executed when the ingame map is open, only if it's closed.

Steps to reproduce:

  • open editor
  • create a scenario
  • create a player (with map)
  • create an init.sqf and put the following in it:
n = 0;
["Adding Mod","add_one_key","Add 1", 
   {
        n = n + 1;
        systemchat (str n);
    }, 
    "", 
    [0xD3, [false, false, false]]
] call CBA_fnc_addKeybind;
  • play the scenario in singleplayer/multiplayer
  • press the delete key: the ingame chat should show you a number (if the key is pressed again, the number should count 1 up)
  • open the ingame map
  • press the delete key: nothing happens/the number stays the same

Where did the issue occur?

  • Editor (Singleplayer) / Editor (Multiplayer)

RPT log file:

  • N/A
@PabstMirror
Copy link
Contributor

(findDisplay 12) displayAddEventHandler ["KeyDown", { systemChat format ["12: %1", _this]}]; 
(findDisplay 46) displayAddEventHandler ["KeyDown", { systemChat format ["46: %1", _this]}];

In normal 3d, only 46 fires.
On the map you get odd results, where both 12 and 46 will fire for most keys,
but a few key only fire on 12, mainly Delete (but not insert), Tab, Page Up/Down, arrow keys, Numpad keys (except 0 and 5???)

And if you have the command menu up, then all keys are detected on both.

Right now we add the keyDown handles to the main display (46)
Maybe we could add keyDown handler to both, and if map is open ignore 46, otherwise ignore 12?

@commy2
Copy link
Contributor

commy2 commented Feb 8, 2018

Will look into this and maybe add a backup handler to display 12 / map display handling the blocked keys.

@commy2 commy2 added the Bug label Feb 8, 2018
@commy2 commy2 added this to the 3.7 milestone Feb 8, 2018
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.

3 participants