Files
Tart/testing/input.cpp

28 lines
548 B
C++
Raw Permalink Normal View History

2025-01-30 03:31:12 +00:00
#include <tart.h>
#include <iostream>
#ifdef _LINUX
#endif
2025-01-31 19:47:49 +00:00
char* bbuf;
2025-01-30 03:31:12 +00:00
int main (int argc, char *argv[]) {
2025-01-31 19:47:49 +00:00
int n;
int counter = 0;
term_disable_cursor();
term_threaded_input_init();
bbuf = term_tinputb();
while(bbuf[0] != 'q') {
std::cout << counter++ << '[';
for (int i = 0; i < 8; i++) {
std::cout << bbuf[i] << ',';
2025-01-30 03:31:12 +00:00
}
2025-01-31 19:47:49 +00:00
std::cout << "] \r";
2025-01-30 03:31:12 +00:00
}
std::cout << '\n';
2025-01-31 19:47:49 +00:00
term_threaded_input_stop();
term_enable_cursor();
exit(0);
2025-01-30 03:31:12 +00:00
return 0;
}