view finch/libgnt/test/key.c @ 21085:7821fa7b22db

propagate from branch 'im.pidgin.pidgin' (head ef97aa9259d77504bb07c2dff5ec0750d498e847) to branch 'org.maemo.garage.pidgin.pidgin.request-with-ui-hint' (head e8b5729ce3e73070299b06e0fba894a819d5cbb4)
author Gabriel Schulhof <nix@go-nix.ca>
date Wed, 10 Oct 2007 23:20:18 +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;
}