view finch/libgnt/test/key.c @ 20147:51457cf3d27b

merge of '0fb234fbd6f0cbba882df8df649a783fea7f312f' and '43e06ba1c67cc326d2d93f14d67709b2375da88b'
author Casey Harkins <charkins@pidgin.im>
date Tue, 18 Sep 2007 01:02:55 +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;
}