import jline.ConsoleReader; import java.io.IOException; class Program01 { public static void main(String[] args) throws IOException { ConsoleReader cr = new ConsoleReader(); int kod; do { kod = cr.readVirtualKey(); System.out.printf("Kod: %d\n", kod); }while(kod!=0x1B); // Esc billentyű decimális 27, hexadecimálisan 1B } }