DISABLE_RAW_KEY_THIS_FRAME
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)
CFX
Signature
lua
DisableRawKeyThisFrame(0)
-- returns BOOLParameters
| Name | Type | Description |
|---|---|---|
| int | Index of raw key from keyboard. |
Usage
Named call
DisableRawKeyThisFrame(0)InvokeNative
Citizen.InvokeNative(0x8BCF0014, 0)lua 1
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")
endDetails
- Hash
- API set
- Source
- cfx
Source: cfx
