view finch/libgnt/test/key.c @ 25249:b535b9ffb929

propagate from branch 'im.pidgin.pidgin' (head 6b951d62be418d5bfc437a1ab747c6ba900d7979) to branch 'im.pidgin.cpw.malu.xmpp.ibb_ft' (head 95e1ae61eda292e6ca5f636d5fc76bac8262940b)
author Marcus Lundblad <ml@update.uu.se>
date Tue, 16 Dec 2008 19:18:41 +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;
}