view finch/libgnt/test/key.c @ 31976:cca6cd8975ef

merge of '3849acda3c84d7798c514bc1a9f80cca6674e52c' and 'c2c0e69d4f4081d4e5c60c2bab7b1a3e6d2f896a'
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 26 Aug 2011 22:13:08 +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;
}