view finch/libgnt/test/key.c @ 28518:8aa7df246e13

Eighth^WNinth time's the charm...
author Paul Aurich <paul@darkrain42.org>
date Mon, 31 Aug 2009 20:27:04 +0000
parents f104e1d45d85
children
line wrap: on
line source

#include <ncurses.h>

int main()
{
	int ch;

	initscr();
	noecho();
	cbreak();
	refresh();

	WINDOW *win = newpad(20, 30);
	box(win, 0, 0);
	prefresh(win, 0, 0, 0, 0, 19, 29);
	doupdate();

	while ((ch = getch())) {
		printw("%d ", ch);
		refresh();
	}

	endwin();
	return 0;
}