view finch/libgnt/test/key.c @ 29443:7cc66981f029

propagate from branch 'im.pidgin.pidgin' (head d33b4d42bee23e1d64289f3e7c83b182ef0e5a91) to branch 'im.pidgin.cpw.rekkanoryo.icqxstatus' (head 5fa1ee0a365568098be2e91550533c59ca3e20f6)
author Richard Laager <rlaager@wiktel.com>
date Mon, 17 Nov 2008 19:09:53 +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;
}