# CFX::IS_DISABLED_RAW_KEY_PRESSED

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

## Signature

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

## Parameters

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

## Returns

`BOOL` — Returns bool value of pressed state.

## Description

*Source: Cfx.re native reference*

Gets if the specified `rawKeyIndex` is pressed, even 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 = IsDisabledRawKeyPressed(rawKeyIndex)

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

### JavaScript

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

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

### C#

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

## Examples

*Source: Cfx.re native reference*

```lua
if IsDisabledRawKeyPressed(32) then -- KEY_SPACE
    print("Spacebar pressed")
end
```

*Sources: Cfx.re native reference.*
