actionKeys: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Expanded note) |
||
Line 65: | Line 65: | ||
with -1660944359 being equal to -1660944384 + 25, and 25 being the DIK code for the "P" key.<br/> | with -1660944359 being equal to -1660944384 + 25, and 25 being the DIK code for the "P" key.<br/> | ||
<br/> | <br/> | ||
This increases the difficulty of accurately comparing key codes to actionKeys in [[User_Interface_Event_Handlers|UI event handlers]]. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile. | This increases the difficulty of accurately comparing key codes to actionKeys in [[User_Interface_Event_Handlers|UI event handlers]]. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile.<br/> | ||
<br/> | |||
In case of mouse buttons, actionKeys will also return values that are different from those in "MouseButton" UI events:<br/> | |||
<br/> | |||
MouseButton 0 = actionKeys 65536<br/> | |||
MouseButton 1 = actionKeys 65665 (65536 + 1 + 128)<br/> | |||
MouseButton 2 = actionKeys 65538 (65536 + 2)<br/> | |||
MouseButton 3 = actionKeys 65539 (65536 + 3)<br/> | |||
MouseButton 4 = actionKeys 65540 (65536 + 4) | |||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 22:14, 12 May 2016
Description
- Description:
- Returns Array containing dikCodes of keys, buttons and combos assigned to the given user action. Action names could be found in config class ControllerSchemes or user action names or user profile, for example:
keyWatch[]={24};
To retrieve the value, use the property name without 'key':
In addition, some of the actions are also listed in here: inputAction/actionsactionKeys "Watch"; // 24
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
_array = actionKeys "ReloadMagazine"
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on May 11, 2016 - 02:36 (UTC)
- AgentRev
-
If an action key is configured with a modifier (e.g. "Right Ctrl + M" for "MiniMapToggle"), the DIK code returned by this command has a weird value, equivalent to the following:
Left Ctrl + Key = 486539264 + DIK
Left Shift + Key = 704643072 + DIK
Left Alt + Key = 939524096 + DIK
Right Ctrl + Key = -1660944384 + DIK
Right Shift + Key = 905969664 + DIK
Right Alt + Key = -1207959552 + DIK
For example, to detect if actionKeys "NetworkPlayers" contain a match for "Right Ctrl + P", one must do the following:if (-1660944359 in actionKeys "NetworkPlayers") then
with -1660944359 being equal to -1660944384 + 25, and 25 being the DIK code for the "P" key.
This increases the difficulty of accurately comparing key codes to actionKeys in UI event handlers. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile.
In case of mouse buttons, actionKeys will also return values that are different from those in "MouseButton" UI events:
MouseButton 0 = actionKeys 65536
MouseButton 1 = actionKeys 65665 (65536 + 1 + 128)
MouseButton 2 = actionKeys 65538 (65536 + 2)
MouseButton 3 = actionKeys 65539 (65536 + 3)
MouseButton 4 = actionKeys 65540 (65536 + 4)