Package org.dreambot.api.input.keyboard
Class StandardKeyboardAlgorithm
- java.lang.Object
 - 
- org.dreambot.api.input.keyboard.StandardKeyboardAlgorithm
 
 
- 
- All Implemented Interfaces:
 KeyboardTypingAlgorithm
public class StandardKeyboardAlgorithm extends java.lang.Object implements KeyboardTypingAlgorithm
 
- 
- 
Constructor Summary
Constructors Constructor Description StandardKeyboardAlgorithm() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMistake(char c)java.lang.StringgetRandomCharInString(java.lang.String string)inthandleTyping(java.lang.String message)Handles typing of characters Intended use is to type one character at a type, but not a requirement Message will be truncated as per the number of characters typed before being re-called Enter is called separately if message is completed successfullyvoidpressEnter()Handles pressing enter, called when the message has been typed successfully if requiredvoidtypeKey(char character)voidtypeKey(Key key)Handles typing of a singularKeyIf you require typing a character that is not in the Key list, the key events are able to send the raw character NOTE - the internal information of the event will not be correct if we do not have the key information for it. 
 - 
 
- 
- 
Method Detail
- 
handleTyping
public int handleTyping(java.lang.String message)
Description copied from interface:KeyboardTypingAlgorithmHandles typing of characters Intended use is to type one character at a type, but not a requirement Message will be truncated as per the number of characters typed before being re-called Enter is called separately if message is completed successfully- Specified by:
 handleTypingin interfaceKeyboardTypingAlgorithm- Parameters:
 message- Message to type, recommended to handle only 1 character (not including shift) before returning- Returns:
 - number of keys typed (not including Shift)
 
 
- 
typeKey
public void typeKey(char character)
 
- 
typeKey
public void typeKey(Key key)
Description copied from interface:KeyboardTypingAlgorithmHandles typing of a singularKeyIf you require typing a character that is not in the Key list, the key events are able to send the raw character NOTE - the internal information of the event will not be correct if we do not have the key information for it.- Specified by:
 typeKeyin interfaceKeyboardTypingAlgorithm
 
- 
getMistake
public java.lang.String getMistake(char c)
 
- 
getRandomCharInString
public java.lang.String getRandomCharInString(java.lang.String string)
 
- 
pressEnter
public void pressEnter()
Description copied from interface:KeyboardTypingAlgorithmHandles pressing enter, called when the message has been typed successfully if required- Specified by:
 pressEnterin interfaceKeyboardTypingAlgorithm
 
 - 
 
 -