Package me.hackware.api
Class ClientInputManager
java.lang.Object
me.hackware.api.ClientInputManager
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic KeybindSettingbind(KeybindSetting setting, Runnable action) Firesactionwhenever the setting's bound key is pressed outside a screen.voidclearPress(int code) static ClientInputManagerget()intgetPressCount(int code) voidinit()booleanisDown(int code) static booleanisHeld(KeybindSetting setting) Whether the setting's bound key is physically held — never inside a screen.longMonotonic counter of every key/mouse press seen.
-
Field Details
-
UNBOUND
public static final int UNBOUND- See Also:
-
-
Method Details
-
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
Firesactionwhenever the setting's bound key is pressed outside a screen. Returns the setting so a field initializer can wrap its creation. -
isHeld
Whether the setting's bound key is physically held — never inside a screen.
-