Example program to test key board pressings (class JSYSTEM::JKeypress).
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JSystem/JKeypress.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
Example program to test key board pressings (class JSYSTEM::JKeypress).
- Author
- mdejong
Definition in file JKeypress.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 16 of file JKeypress.cc.
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;
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Enable unbuffered terminal input.
char get()
Get single character.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).