bool IsKeyDefined(string keyName)
bool IsKeyDefined(int keyHash)


keyName: The name of the key (action), as defined in SetKey().
keyHash: The hashcode of the name of the key (action), as defined in SetKey().


bool: Returns true if keyName or keyHash exists.


Use this to determine if a key exists by the name of keyName or the hashcode of keyHash.

Note that you will probably never need to use this method unless you are a developer making a separate script/plugin and you want to make it compatible with cInput.


// make sure user has defined this key if (cInput.IsKeyDefined("Left")) { // do cInput stuff } else { // fallback to non-cInput stuff? }

results matching ""

    No results matching ""