GetKey
Last updated
Was this helpful?
Last updated
Was this helpful?
bool GetKey(string description) bool GetKey(int descriptionHash)
description: The name of the key, as defined in . descriptionHash: The hashcode of the name of the key, as defined in .
bool: Returns true
if the key is being held down.
Use this to determine if a key is being held down. GetKey()
returns true
repeatedly while the user holds down the key, and returns false
if the key is not being pressed.
The use of or is recommended if you want to trigger an event only once per keypress, e.g., for jumping.