view finch/libgnt/test/key.c @ 30478:0b22c840f4f4

merge of '5378b2067023c1be51d87906196d87f03c9992e3' and 'da604206b18f52b79c03f5cdd11dc0438e46038b'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 07 May 2010 20:04:42 +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;
}