Class Keyboard
- java.lang.Object
-
- com.runemate.game.api.hybrid.input.Keyboard
-
public final class Keyboard extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int[]
KEYCODE_MAPPING
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
isInputAllowed()
static boolean
isPressed(int keycode)
static boolean
pressKey(int keycode)
static boolean
pressKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
static boolean
releaseKey(int keycode)
static boolean
releaseKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
static void
toggleInput()
Deprecated.static boolean
type(java.lang.String text, boolean pressEnter)
Types the string into the focused widget.static boolean
typeKey(char character)
static boolean
typeKey(char character, int delay)
Maps the specified character to a keycode all then types itstatic boolean
typeKey(int keycode)
static boolean
typeKey(int keycode, int delay)
static boolean
typeKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
static boolean
typeKey(com.runemate.game.api.hybrid.input.Keyboard.Key key, int delay)
static boolean
typeKey(java.lang.String character)
Types a single character passed in as a String object.
-
-
-
Method Detail
-
isPressed
public static boolean isPressed(int keycode)
-
pressKey
public static boolean pressKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
-
pressKey
public static boolean pressKey(int keycode)
-
releaseKey
public static boolean releaseKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
-
releaseKey
public static boolean releaseKey(int keycode)
-
typeKey
public static boolean typeKey(com.runemate.game.api.hybrid.input.Keyboard.Key key, int delay)
-
typeKey
public static boolean typeKey(com.runemate.game.api.hybrid.input.Keyboard.Key key)
-
typeKey
public static boolean typeKey(int keycode)
-
typeKey
public static boolean typeKey(int keycode, int delay)
-
typeKey
public static boolean typeKey(char character, int delay)
Maps the specified character to a keycode all then types it- Parameters:
character
- The character to be mapped all typed- Returns:
- Whether or not the character was successfully typed
-
typeKey
public static boolean typeKey(char character)
-
typeKey
public static boolean typeKey(java.lang.String character)
Types a single character passed in as a String object.
-
type
public static boolean type(java.lang.String text, boolean pressEnter)
Types the string into the focused widget.- Parameters:
text
- The String to be typedpressEnter
- Whether or not to press enter after typing the string- Returns:
- Whether or not typing was successful
-
isInputAllowed
public static boolean isInputAllowed()
-
toggleInput
@Deprecated public static void toggleInput()
Deprecated.DEPRECATED - toggling mouse and keyboard input is now exclusively controlled by the user, who can set a default value via user settings.
-
-