view finch/libgnt/test/key.c @ 20798:97bda4a072d2

merge of '1757e82b3ed17d8ad45db9d2c62f0187a8bee93d' and '3d1e069061da093a2d8773199e5938f384f2e9f1'
author Will Thompson <will.thompson@collabora.co.uk>
date Sat, 06 Oct 2007 17:49:40 +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;
}