"by Christian Sunesson -
christian.sunesson@abc.se * 1998 Oct */
#include <termios.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
struct termios orig, changes;
tcgetattr(STDIN_FILENO, &orig);
changes = orig;
changes.c_lflag &= ~(ICANON|ECHO);
tcsetattr(STDIN_FILENO, TCSADRAIN, &changes);
puts("Hit any key!");
getchar();
puts("Thanks!");
/* restore old settings */
tcsetattr(STDIN_FILENO, TCSADRAIN, &orig);
return 0;
}
1998 Oct. First published
2000 Apr. Rewritten in XML
This article is Copyright © 1998-2000 by Christian Sunesson and Copyright © 1998-2000 by C-Scene. All Rights Reserved. "