public class Keyboard extends API
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
Keyboard() |
Modifier and Type | Method and Description |
---|---|
java.awt.event.KeyListener |
getKeyListener()
Gets the client's key listener.
|
void |
initializeModule() |
boolean |
isKeyDown(int keyCode)
Returns whether or not the key is currently being pressed
|
void |
pressKey(int keyCode)
Sends a KEY_PRESSED event to the key event handler.
|
void |
releaseKey(int keyCode)
Sends a KEY_RELEASED event to the key event handler.
|
boolean |
typeContinualKey(char key,
Condition condition)
Types in one character as long as the specified condition evaluates to false with the specified modifiers.
|
boolean |
typeContinualKey(char key,
int mods,
boolean enter,
Condition condition)
Types in one character as long as the specified condition evaluates to false with the specified modifiers
finishing up with enter as specified.
|
boolean |
typeContinualKey(char key,
int mods,
Condition condition)
Types in one character as long as the specified condition evaluates to false with the specified modifiers.
|
void |
typeEnter() |
void |
typeEscape() |
boolean |
typeFKey(int key) |
boolean |
typeKey(char key)
Types in one character.
|
boolean |
typeKey(char key,
int mods)
Types in one character with the specified modifiers.
|
boolean |
typeKey(char key,
int mods,
boolean enter)
Types in one character with the specified modifiers finishing up with enter as specified.
|
boolean |
typeKey(char key,
int mods,
int time,
boolean enter)
Types in one character for the specified amount of time in milliseconds with the specified modifiers
finishing up with enter as specified.
|
boolean |
typeString(java.lang.String string)
Types a string and finishes up with enter.
|
boolean |
typeString(java.lang.String string,
boolean enter)
Types a string and finishes up with enter as specified.
|
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public final boolean typeString(java.lang.String string)
string
- The string to type.public final boolean typeString(java.lang.String string, boolean enter)
string
- The string to type.enter
- Whether to finish up with enter.public final boolean typeKey(char key)
key
- The character to type.public final boolean typeKey(char key, int mods)
key
- The character to type.mods
- The modifiers to send the character with.public final boolean typeKey(char key, int mods, boolean enter)
key
- The character to type.mods
- The modifiers to send the character with.enter
- Whether to finish up with enter.public final boolean typeKey(char key, int mods, int time, boolean enter)
key
- The character to type.mods
- The modifiers to send the characters with.time
- The time in milliseconds to hold down the character key.enter
- Whether to finish up with enter.public final boolean typeContinualKey(char key, Condition condition)
key
- The character to type.condition
- The condition for which as long as it evaluates to false the key event will continue to hold down
the specified character.public final boolean typeContinualKey(char key, int mods, Condition condition)
key
- The character to type.mods
- The modifiers to send the character with.condition
- The condition for which as long as it evaluates to false the key event will continue to hold down
the specified character.public final boolean typeContinualKey(char key, int mods, boolean enter, Condition condition)
key
- The character to type.mods
- The modifiers to send the characters with.enter
- Whether to finish up with enter.condition
- The condition for which as long as it evaluates to false the key event will continue to hold down
the specified character.public boolean isKeyDown(int keyCode)
keyCode
- The id code of the key to checkpublic void typeEnter()
public void typeEscape()
public boolean typeFKey(int key)
public void pressKey(int keyCode)
keyCode
- The KeyCode for the key to type.public void releaseKey(int keyCode)
keyCode
- The KeyCode for the key to type.public java.awt.event.KeyListener getKeyListener()
public void initializeModule()
initializeModule
in class API