Open
Description
Describe the bug
Using bindKey with keyState=both on a command stops triggering on releasing the key after restarting the resource.
To reproduce
local someVariable = false
addCommandHandler("Some Command Handler", function()
someVariable = not someVariable
outputChatBox("State: " .. (someVariable == true and "down" or "up"))
end)
addEventHandler("onClientResourceStart", resourceRoot, function()
bindKey("k", "both", "Some Command Handler")
end)
- Start the resource
- Press 'K' and you will see it working properly
- Restart the resource
- Press 'K' and you will see that it won't trigger when you release the key
Expected behaviour
It should also trigger when releasing the key.
Screenshots
Version
Server/Client: 1.5.7
Windows 10 Build 18363.778
Additional context