# CFX::DISABLE_RAW_KEY_THIS_FRAME

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

## Signature

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

## Parameters

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

## Returns

`BOOL` — Returns bool value of down state.

## Description

*Source: Cfx.re native reference*

Disables the specified `rawKeyIndex`, making it not trigger the regular `IS_RAW_KEY_*` natives.

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

## Usage

### Lua

```lua
local retval = DisableRawKeyThisFrame(rawKeyIndex)

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

### JavaScript

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

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

### C#

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

## Examples

*Source: Cfx.re native reference*

```lua
local KEY_SPACE = 32
DisableRawKeyThisFrame(KEY_SPACE)
-- This will not get triggered this frame
if IsRawKeyDown(KEY_SPACE) then
	print("unreachable :(")
end
-- this will get triggered
if IsDisabledRawKeyDown(KEY_SPACE) then
    print("Spacebar is down")
end
```

*Sources: Cfx.re native reference.*
