RedM Natives

IS_DISABLED_RAW_KEY_DOWN

Gets if the specified rawKeyIndex is pressed down, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Hash0x36366EC3
Runtime nameIsDisabledRawKeyDown
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

BOOL IS_DISABLED_RAW_KEY_DOWN(int rawKeyIndex);

Parameters

NameTypeDescription
rawKeyIndexint

Index of raw key from keyboard.

Returns BOOL — Returns bool value of down state.

Description

Cfx.re native reference

Gets if the specified rawKeyIndex is pressed down, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Virtual key codes can be found here

Usage

Lua
local retval = IsDisabledRawKeyDown(rawKeyIndex)

-- always works, by hash
local retval = Citizen.InvokeNative(0x36366ec3, rawKeyIndex, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsDisabledRawKeyDown(rawKeyIndex);

// by hash
const retval = Citizen.invokeNative('0x36366ec3', rawKeyIndex, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x36366ec3, rawKeyIndex);

Examples

LUA · Cfx.re native reference
if IsDisabledRawKeyDown(32) then -- KEY_SPACE
    print("Spacebar is down")
end

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.