16 int main(
int argc,
char* argv[])
25 JParser<> zap(
"Example program to test key board pressings.");
32 catch(
const exception &error) {
33 FATAL(error.what() << endl);
41 cout <<
"> " << flush;
45 cout << endl <<
"return <" << (char) c <<
">" << endl;
54 for (
int i = 0; i != 10000; ++i) {
56 cout << setw(5) << i << flush <<
'\r';
58 if (keypress.
timeout(timeout_us)) {
64 cout << endl <<
"return <" << (char) c <<
">" << endl;
int main(int argc, char *argv[])
Keyboard settings for unbuffered input.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Enable unbuffered terminal input.
bool timeout(JTimeval timeout)
Timeout method.
char get()
Get single character.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).