Interface InputProvider

    • Method Detail

      • pollInput

        KeyStroke pollInput()
                     throws java.io.IOException
        Returns the next Key off the input queue or null if there is no more input events available. Note, this method call is not blocking, it returns null immediately if there is nothing on the input stream.
        Returns:
        Key object which represents a keystroke coming in through the input stream
        Throws:
        java.io.IOException - Propagated error if the underlying stream gave errors
      • readInput

        KeyStroke readInput()
                     throws java.io.IOException
        Returns the next Key off the input queue or blocks until one is available. NOTE: In previous versions of Lanterna, this method was not blocking. From lanterna 3, it is blocking and you can call pollInput() for the non-blocking version.
        Returns:
        Key object which represents a keystroke coming in through the input stream
        Throws:
        java.io.IOException - Propagated error if the underlying stream gave errors