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

Resolved Keyboard API

Discussion in 'Developer Support' started by awesome123man, Mar 8, 2017.

  1. awesome123man

    awesome123man Go check out new bots and give helpful feedback.

    Joined:
    Jan 31, 2016
    Messages:
    5,413
    Likes Received:
    1,662
    Keyboard.isPressed() and Keyboard.pressKey() seem to run into issues.
    When you use #pressKey() the key will be pressed, but occasionally and at random times, it will stop being pressed but the #isPressed() method returns true. I am not sure what causes the release that the Keyboard class can't detect, and I though the last answer I got on this is that it isn't fixable. Thanks.

     
  2. Best Answer:
    Post #8 by Cloud, Mar 24, 2017
  3. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    If another method in the client or even yourself press and release the key again it will remain released.
     
  4. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    I have an idea.
     
  5. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    Btw @awesome123man, calling .releaseKey will "reset" the state, shouldnt be hard to implement a failsafe into your bots.
     
    awesome123man likes this.
  6. awesome123man

    awesome123man Go check out new bots and give helpful feedback.

    Joined:
    Jan 31, 2016
    Messages:
    5,413
    Likes Received:
    1,662
    I thought I had a failsafe kinda like this. I'll make sure to add it though.
     
  7. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    It's ok though, the bug is about to be fixed. The pressed keys have been hooked, only thing left is to find out the mapping.
     
  8. awesome123man

    awesome123man Go check out new bots and give helpful feedback.

    Joined:
    Jan 31, 2016
    Messages:
    5,413
    Likes Received:
    1,662
    Oh sweet!
     
  9. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Fixed in the next release.
     
    Slex, awesome123man and Snufalufugus like this.

Share This Page

Loading...