Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Bug Keyboard.toggleInput() and Mouse.toggleInput() don't update on client

cuppa.drink(java);
Joined
Mar 13, 2018
Messages
6,966
The below Keyboard and Mouse .toggleInput() functions seem to bug out
Code:
if(Keyboard.isInputAllowed()) {
Keyboard.toggleInput();
}

if(Mouse.isInputAllowed()) {
Mouse.toggleInput();
}

While it seems to work, it disables Keyboard/Mouse input when called if they're currently unblocked, it doesn't seem to visually update it on the client. Eg. in the "BLOCK INPUT" dropdown next to Stop and Pause, both Keyboard and Mouse are still unchecked (indicating unblocked) even though attempting to click the client shows they're blocked.

At least this is the interaction I noticed, seems reproducible. Minor bug.
 
Bump, this bug still exists in the client. I can record a video clip of it if it's not clear what I'm trying to convey. Basically if you toggle the Mouse or Keyboard blocking in code, it does change the state, but the dropdown in the GUI goes out of sync and only updates when it's clicked on in GUI.

So if mouse is unblocked and Mouse.toggleInput() is called, then the player is blocked from moving the mouse yet the GUI shows mouse as unblocked still, causing confusion. If you click on "UNBLOCKED" in GUI it sets the GUI to blocked and keeps the user blocked from moving the mouse, so the user thinks they can't unblock the mouse. It's only if you click "BLOCKED" again in the GUI, the user can finally use the mouse again.

Seems like a pretty quick fix, I assume the bot client "BLOCK INPUT" GUI just also needs to be updated when Mouse/Keyboard.toggleInput() are executed.
 
Side note, I'm seeing that this is a known bug (Mouse and Keyboard toggleInput don't seem to work (#271) · Issues · RuneMate / Community · GitLab) but I assume not a lot of bots are facing this bug so it's low priority. I'm changing up my bot slightly to make it less of an issue for my specific case, but Mouse.toggleInput() & Keyboard.toggleInput() are still partially not working (not updating in GUI)
 
Top