Interface Keyboard


  • public interface Keyboard
    A Keyboard provides methods for sending keystrokes to a host.
    Version:
    $Id$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void sendBytes​(byte[] bytes)
      Sends "raw" bytes to the host at the current cursor position.
      void sendKey​(String key)
      Sends a key to the host at the current cursor position.
      void sendText​(String string)
      Sends text to the host at the current cursor position.
      void setDebugDelaySendKey​(int delay, TimeUnit units)
      Set the amount of time to pause before every sendKey call, to assist with simple debugging.
      void setDebugDelaySendText​(int delay, TimeUnit units)
      Set the amount of time to pause before every sendText call, to assist with simple debugging.
    • Method Detail

      • sendText

        void sendText​(String string)
        Sends text to the host at the current cursor position.
        Parameters:
        string - the text to send to the host.
      • sendKey

        void sendKey​(String key)
        Sends a key to the host at the current cursor position. The list of possible keys is in Keys, specifically Keys.Ibm5250, Keys.Ibm3270, and Keys.AnsiVT.
        Parameters:
        key - the key to send to the host. See Keys.
      • setDebugDelaySendKey

        void setDebugDelaySendKey​(int delay,
                                  TimeUnit units)
        Set the amount of time to pause before every sendKey call, to assist with simple debugging. The delay might be less than requested if the thread is interrupted via Thread.interrupt().
        Parameters:
        delay - the delay
        units - the unit of the delay
      • setDebugDelaySendText

        void setDebugDelaySendText​(int delay,
                                   TimeUnit units)
        Set the amount of time to pause before every sendText call, to assist with simple debugging. The delay might be less than requested if the thread is interrupted via Thread.interrupt().
        Parameters:
        delay - the delay
        units - the unit of the delay
      • sendBytes

        void sendBytes​(byte[] bytes)
        Sends "raw" bytes to the host at the current cursor position. Same as getScreen().getKeyboard().sendBytes(bytes). Typically used with VT to send "non standard" byte sequences.
        Parameters:
        bytes - the bytes to send to the host.