Class ClientInputManager

java.lang.Object
me.hackware.api.ClientInputManager

public final class ClientInputManager extends Object
  • Field Details

  • Method Details

    • get

      public static ClientInputManager get()
    • init

      public void init()
    • isDown

      public boolean isDown(int code)
    • getPressCount

      public int getPressCount(int code)
    • clearPress

      public void clearPress(int code)
    • pressSequence

      public long pressSequence()
      Monotonic counter of every key/mouse press seen. Comparing snapshots tells whether anything else was pressed in between (e.g. whether a held modifier stayed "clean" until release).
    • bind

      public static KeybindSetting bind(KeybindSetting setting, Runnable action)
      Fires action whenever the setting's bound key is pressed outside a screen. Returns the setting so a field initializer can wrap its creation.
    • isHeld

      public static boolean isHeld(KeybindSetting setting)
      Whether the setting's bound key is physically held — never inside a screen.