cock.convertKey
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.