# GetKeyDown

*bool* **GetKeyDown**(*string* **description**)\
\&#xNAN;*bool* **GetKeyDown**(*int* **descriptionHash**)

## Parameters

**description**: The name of the key, as defined in [`SetKey()`](https://cmonkeys.gitbook.io/cinput-reference-manual/script-reference/methods/setkey).\
**descriptionHash**: The hashcode of the name of the key, as defined in [`SetKey()`](https://cmonkeys.gitbook.io/cinput-reference-manual/script-reference/methods/setkey).

## Returns

**bool**: Returns `true` only once each time the key is first pressed down.

## Description

Use this to determine if a key has been pressed during this frame. `GetKeyDown()` returns `true` *only once* when the key is first pressed down.

The use of [`GetKey()`](https://cmonkeys.gitbook.io/cinput-reference-manual/script-reference/methods/getkey) is recommended if you want to trigger an event repeatedly while the key is being held down, e.g., for continuous movement.

## Example
