public void run() {
      ConsoleMod con = new ConsoleMod() {
            public void window_resized() {
               println("New window size: " + width + "x" + height + "\r");
               flush();
            }
         };
      useModule(con);
      con.rawMode(true);
      try {
         while (true) {
            // Blocks
            int ch = stdin.read();
            if (ch == -1 || ch == 3) break;
            print("(" + ch);
            // Flush the rest on the same line
            int avail = stdin.available();
            for (int a = 0; a<avail; a++) {
               ch = stdin.read();
               if (ch == -1 || ch == 3) break;
               print(" " + ch);
            }
            println(")\r");
            flush();
         }
      } catch (IOException e) {}
   }