Keyboard example.
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpDebug.h>
#include <iostream>
#include <visp3/io/vpKeyboard.h>
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
#endif
std::cout << "Push some characters on the keyboard..." << std::endl;
printf("Hit 'q' or 'Q' to stop the loop ...\n");
std::cout << "Start the keyboard scrutation..." << std::endl;
for (;;) {
printf("You hit key: %d '%c'\n", c, c);
if (c == 'q' || c == 'Q') {
printf("You hit key: %d %c we stop the loop\n", c, c);
break;
}
}
}
std::cout << "Enter an integer: ";
int myvalue;
std::cin >> myvalue;
return EXIT_SUCCESS;
}
Keyboard management under unix (Linux or OSX). This class is not available under windows.