Package rsb.internal

Class InputManager

java.lang.Object
rsb.internal.InputManager

public class InputManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clickMouse(boolean left)
    Click the mouse at the current position.
    void
    dragMouse(int x, int y)
    Drag the mouse from the current position to a certain other position.
    int
     
    int
     
    void
    holdKey(int keyCode, int ms)
     
    void
    hopMouse(int x, int y)
     
    void
    moveMouse(int x, int y, int randomX, int randomY)
     
    void
    moveMouse(int speed, int x, int y, int randomX, int randomY)
    Moves the mouse to the specified point at a certain sped.
    void
    pressKey(char ch)
     
    int
    random(int min, int max)
     
    void
    releaseKey(char ch)
     
    void
    sendKey(char c)
     
    void
    sendKeys(String text, boolean pressEnter)
     
    void
    sendKeys(String text, boolean pressEnter, int delay)
     
    void
    sendKeys(String text, boolean pressEnter, int minDelay, int maxDelay)
     
    void
    sendKeysInstant(String text, boolean pressEnter)
     
    void
     
    void
    windMouse(int x, int y)
     
    void
    windMouse(int curX, int curY, int targetX, int targetY)
    Moves the mouse from a certain point to another at the default speed.
    void
    windMouse(int speed, int curX, int curY, int targetX, int targetY)
    Deprecated.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InputManager

      public InputManager(RuneLite bot)
  • Method Details

    • clickMouse

      public void clickMouse(boolean left)
      Click the mouse at the current position.
      Parameters:
      left - whether to click the left mouse button or not
    • dragMouse

      public void dragMouse(int x, int y)
      Drag the mouse from the current position to a certain other position.
      Parameters:
      x - the x coordinate to drag to
      y - the y coordinate to drag to
    • getX

      public int getX()
    • getY

      public int getY()
    • holdKey

      public void holdKey(int keyCode, int ms)
    • hopMouse

      public void hopMouse(int x, int y)
    • moveMouse

      public void moveMouse(int x, int y, int randomX, int randomY)
      Parameters:
      x - the x value
      y - the y value
      randomX - x-axis randomness (added to x)
      randomY - y-axis randomness (added to y)
    • moveMouse

      public void moveMouse(int speed, int x, int y, int randomX, int randomY)
      Moves the mouse to the specified point at a certain sped.
      Parameters:
      speed - the lower, the faster.
      x - the x value
      y - the y value
      randomX - x-axis randomness (added to x)
      randomY - y-axis randomness (added to y)
    • pressKey

      public void pressKey(char ch)
    • random

      public int random(int min, int max)
    • releaseKey

      public void releaseKey(char ch)
    • sendKey

      public void sendKey(char c)
    • sendKeys

      public void sendKeys(String text, boolean pressEnter)
    • sendKeys

      public void sendKeys(String text, boolean pressEnter, int delay)
    • sendKeys

      public void sendKeys(String text, boolean pressEnter, int minDelay, int maxDelay)
    • sendKeysInstant

      public void sendKeysInstant(String text, boolean pressEnter)
    • sleepNoException

      public void sleepNoException(long t)
    • windMouse

      public void windMouse(int curX, int curY, int targetX, int targetY)
      Moves the mouse from a certain point to another at the default speed.
      Parameters:
      curX - the x value to move from
      curY - the y value to move from
      targetX - the x value to move to
      targetY - the y value to move to
      See Also:
    • windMouse

      @Deprecated public void windMouse(int speed, int curX, int curY, int targetX, int targetY)
      Deprecated.
      Moves the mouse from a certain point to another, with specified speed.
      Parameters:
      speed - the lower, the faster.
      curX - the x value to move from
      curY - the y value to move from
      targetX - the x value to move to
      targetY - the y value to move to
    • windMouse

      public void windMouse(int x, int y)