Difference between revisions of "cock.convertKey"
(Created page with "Conditionally converts literal to numerical input key names and vice versa. Essentially, performs cock.convertAxis if device was axis-like, otherwise returns unchanged input....") |
m (→See also) |
||
Line 15: | Line 15: | ||
*[[cock.convertAxis]] | *[[cock.convertAxis]] | ||
*[[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 Manual]] | *[[Common Organization of Controls Kit Manual]] |
Revision as of 18:08, 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.