presto-cli/src/main/java/io/prestosql/cli/StatusPrinter.java/StatusPrinter/readKey
class StatusPrinter:    private static int readKey(Terminal terminal)
    {
        try {
            return terminal.reader().read(1L);
        }
        catch (IOException e) {
            return -1;
        }
    }