# CFX::IS_RAW_KEY_RELEASED

- **Hash:** `0xEAA50861`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `IsRawKeyReleased`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/IS_RAW_KEY_RELEASED

## Signature

```c
BOOL IS_RAW_KEY_RELEASED(int rawKeyIndex);
```

## Parameters

- `rawKeyIndex` (`int`) — Index of raw key from keyboard.

## Returns

`BOOL` — Returns bool value of released state.

## Description

*Source: Cfx.re native reference*

Gets if the specified `rawKeyIndex` was just released on the keyboard.

This will not be triggered if the key is disabled with [DISABLE_RAW_KEY_THIS_FRAME](#\_0x8BCF0014)

Virtual key codes can be found [here](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)

## Usage

### Lua

```lua
local retval = IsRawKeyReleased(rawKeyIndex)

-- always available, by hash
local retval = Citizen.InvokeNative(0xeaa50861, rawKeyIndex, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsRawKeyReleased(rawKeyIndex);

// by hash
const retval = Citizen.invokeNative('0xeaa50861', rawKeyIndex, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0xeaa50861, rawKeyIndex);
```

## Examples

*Source: Cfx.re native reference*

```lua
if IsRawKeyReleased(32) then -- KEY_SPACE
    print("Spacebar released")
end
```

*Sources: Cfx.re native reference.*
