BIS fnc keyCode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= GUI


|1.00|= Game version
|descr= Returns DIK code of a given key.
____________________________________________________________________________________________


| <pre>/*
|s1= input call [[BIS_fnc_keyCode]]


Description:
|p1= input:
Returns DIK code of a given key
* [[Number]]: Key code
* [[String]]: Key name
* [[Boolean]]: Return key definitions


Parameter(s):
|x1= <sqf>13 call BIS_fnc_keyCode; // Returns "EQUALS"</sqf>
_this:
STRING - key name
NUMBER - key code
BOOL - return array of key definitions


Returns:
|x2= <sqf>"EQUALS" call BIS_fnc_keyCode; // returns 13</sqf>
STRING - key name
NUMBER - key code
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x3= <sqf>true call BIS_fnc_keyCode; // returns ["ESCAPE",1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"0",11,"MINUS",12,"EQUALS",13...]</sqf>
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_keyCode]]; --> |= Syntax
|r1= [[String]], [[Number]] or [[Array]]
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[DIK KeyCodes]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:keyCode}}]]
[[Category:Functions|{{uc:keyCode}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:keyCode}}]]

Latest revision as of 23:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Returns DIK code of a given key.
Execution:
call
Groups:
GUI

Syntax

Syntax:
input call BIS_fnc_keyCode
Parameters:
input:
Return Value:
String, Number or Array

Examples

Example 1:
13 call BIS_fnc_keyCode; // Returns "EQUALS"
Example 2:
"EQUALS" call BIS_fnc_keyCode; // returns 13
Example 3:
true call BIS_fnc_keyCode; // returns ["ESCAPE",1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"0",11,"MINUS",12,"EQUALS",13...]

Additional Information

See also:
DIK KeyCodes

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