> For the complete documentation index, see [llms.txt](https://refresh-cx.gitbook.io/refresh.cx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refresh-cx.gitbook.io/refresh.cx-docs/input/is-key-pressed.md).

# Is Key Pressed

Returns true while the key is held down. Key codes are Win32 virtual-key codes.

## **Syntax**

```lua
refresh.Input.IsKeyPressed(vkCode) -> Boolean
```

## **Return**

{% hint style="success" %}
Boolean (key held)
{% endhint %}

## Usage Example

```lua
if refresh.Input.IsKeyPressed(0x2D) then
    print("INSERT held")
end
```
