1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Developer Support' started by CuppaJava, Feb 19, 2020.

  1. CuppaJava

    CuppaJava cuppa.drink(java);

    Joined:
    Mar 13, 2018
    Messages:
    6,120
    Likes Received:
    1,378
    The below Keyboard and Mouse .toggleInput() functions seem to bug out
    Code (Text):
    1. if(Keyboard.isInputAllowed()) {
    2. Keyboard.toggleInput();
    3. }
    4.  
    5. if(Mouse.isInputAllowed()) {
    6. Mouse.toggleInput();
    7. }
    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.
    --- Double Post Merged, May 13, 2020, Original Post Date: Feb 19, 2020 ---
    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.
    --- Double Post Merged, May 21, 2020 ---
    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)
     

Share This Page

Loading...