Class StandardKeyboardAlgorithm

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMistake​(char c)  
      java.lang.String getRandomCharInString​(java.lang.String string)  
      int handleTyping​(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 successfully
      void pressEnter()
      Handles pressing enter, called when the message has been typed successfully if required
      void typeKey​(char character)  
      void typeKey​(Key key)
      Handles typing of a singular Key If 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandardKeyboardAlgorithm

        public StandardKeyboardAlgorithm()
    • Method Detail

      • handleTyping

        public int handleTyping​(java.lang.String message)
        Description copied from interface: KeyboardTypingAlgorithm
        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 successfully
        Specified by:
        handleTyping in interface KeyboardTypingAlgorithm
        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: KeyboardTypingAlgorithm
        Handles typing of a singular Key If 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:
        typeKey in interface KeyboardTypingAlgorithm
      • getMistake

        public java.lang.String getMistake​(char c)
      • getRandomCharInString

        public java.lang.String getRandomCharInString​(java.lang.String string)