view finch/libgnt/test/key.c @ 22195:6419554aadd9

merge of '7a2d6f31a70791d5e6e8af6fae041e30d5a1c48f' and 'a0479b7ebd8713b6442fb2ecb8238b7e71be61b5'
author Sean Egan <seanegan@gmail.com>
date Fri, 25 Jan 2008 00:51:06 +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;
}