IsControlJustPressed - Doesn't work when SetNuiFocus is true


I’m trying to enable a menu when a button is pressed and I’m trying to use IsControlJustPressed to detect a button being pressed. It works fine when I first press the button, the menu opens. The problem is that I can’t close it again using IsControlJustPressed.
Any way to get it to work?


Either listen for the close key on the NUI side or move all key press logic to the lua side and don’t set SetNuiFocus


Thanks, I’ll try it soon