Difference between revisions of "VN fnc kbm getKey"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (1 revision imported)
m (Some wiki formatting)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
{{Function
 
{{Function
  
 
|v= 1.00
 
|v= 1.00
  
|a= Heyoxe
+
|author= Heyoxe
  
|e=
+
|a=
 +
 
 +
|e= local
  
 
|g1= keybinding
 
|g1= keybinding
  
|d= <pre>/*
+
|d= Returns the currently assigned keybind to a specific action.
File: fn_kbm_getKey.sqf
 
Author: Heyoxe
 
Date: 2020-10-14
 
Last Update: 2020-11-06
 
Public: Yes
 
 
Description:
 
Returns the currently assigned keybind to a specific action.
 
 
Parameter(s):
 
_action - Name of the action as define in the confign [STRING, defaults to "]
 
 
 
Returns:
 
_parsed: Array representing the current assigned key and it's modifiers [ARRAY]
 
0 - _key: <Number> DIK Key code.
 
1 - _shift: <Boolean> Needs Shift modifier to be pressed.
 
2 - _ctrl: <Boolean> Needs Ctrl modifier to be pressed.
 
3 - _alt: <Boolean> Needs Alt modifier to be pressed.
 
 
Example(s):
 
private _data = ["GestureMenu"] call VN_fnc_kbm_getKey; // _data => [15,false,false,false] (default)
 
*/
 
 
 
  
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
+
|s= [] call [[VN_fnc_kbm_getKey]]
  
|s= [] call [[VN_fnc_kbm_getKey]];
+
|p1n= action
 
+
|p1t= string
|p1n=
+
|p1d= name of the action as defined in config
|p1t=
 
|p1d=
 
 
|p1v=
 
|p1v=
  
|p2n=
+
|r1t= array
|p2t=
+
|r1d= format [key, shift, ctrl, alt]:
|p2d=
+
* key: {{DataType|number}} - {{Biki|DIK_KeyCodes|DIK key code}}
|p2v=
+
* shift: {{DataType|boolean}} - shift modifier needed
 
+
* ctrl: {{DataType|boolean}} - ctrl modifier needed
|r1t=
+
* alt: {{DataType|boolean}} - alt modifier needed
|r1d=
 
  
|x1= <code>-</code>
+
|x1= <code>private _data = ["GestureMenu"] call [[VN_fnc_kbm_getKey]]; {{cc|returns [15,false,false,false] (default)}}</code>
 
}}
 
}}

Latest revision as of 20:17, 26 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Heyoxe
Argument(s): n/a
Effect(s): local

Description

Returns the currently assigned keybind to a specific action.

Syntax

Syntax
[] call VN_fnc_kbm_getKey
Parameters
action: String - name of the action as defined in config
Return value
Array - format [key, shift, ctrl, alt]:

Examples

Example 1
private _data = ["GestureMenu"] call VN_fnc_kbm_getKey; // returns [15,false,false,false] (default)