#!/usr/bin/perl -w
# 1999-06
# http://www.cyut.edu.tw/~ckhung/b/mi/
use Curses;

initscr;
cbreak;
noecho;
addstr(0, 0, "press 'q' or 'Q' to quit\n");
$c = getch;
$i = 0;
while ($c ne 'q' and $c ne 'Q') {
    addstr($i+2, 0, sprintf("You pressed $c (%02x)   ", ord($c)));
    $c = getch;
    $i = ($i + 1) % 10;
}
endwin;

