mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
17 lines
398 B
C++
17 lines
398 B
C++
#include <ion/events.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
/* Use this implementation of Ion::Events::getEvent to simulate pre-recorded key
|
|
* presses. It streams event recorded to a file and played back from standard
|
|
* input. */
|
|
|
|
Ion::Events::Event Ion::Events::getEvent(int * timeout) {
|
|
int c = getchar();
|
|
if (c == EOF) {
|
|
exit(0);
|
|
} else {
|
|
return Ion::Events::Event(c);
|
|
}
|
|
}
|