Difference between revisions of "cock.convertKey"

m
 
Line 16: Line 16:
 
*[[Common Organization of Controls Kit Input devices]]
 
*[[Common Organization of Controls Kit Input devices]]
 
*[[Common Organization of Controls Kit Input keys]]
 
*[[Common Organization of Controls Kit Input keys]]
*[[Common Organization of Controls Kit Manual]]
+
*[[parent::Common Organization of Controls Kit Manual]]
 +
[[Category:Functions]]
 +
*[[Common Organization of Controls Kit]]
 +
 
 +
{{#set:Description=Converts key.}}

Latest revision as of 18:20, 2 September 2013

Conditionally converts literal to numerical input key names and vice versa. Essentially, performs cock.convertAxis if device was axis-like, otherwise returns unchanged input.

Function

Synopsis

converted = cock.convertKey ( device, input, forceliteral )

Arguments

number device
Input device, numerical or literal.
number input
Input key, numerical or literal.
boolean forceliteral
Optional. Forces literal ("true") or numerical ("false") output. Will perform conversion regardless if not provided.

Returns

string converted
Converted input key.

Remarks

Function will make no change if it was supplied with literal input and forced to output literal value. Same for numerical values.

See also