#include <stddef.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
std::string Stringify(
Event event) {
std::string out;
for (
auto& it : event.
input())
out = "(" + out + " ) -> ";
out += "character(" + event.character() + ")";
out += "mouse";
out += "_left";
break;
out += "_middle";
break;
out += "_right";
break;
out += "_none";
break;
out += "_wheel_up";
break;
out += "_wheel_down";
break;
}
out += "_pressed";
break;
out += "_released";
break;
}
out += "_control";
out += "_shift";
out += "_meta";
out += "(" +
} else {
out += "(special)";
}
return out;
}
int main(int argc, const char* argv[]) {
std::vector<Event> keys;
for (size_t i = std::max(0, (int)keys.size() - 20); i < keys.size(); ++i)
children.push_back(
text(Stringify(keys[i])));
});
keys.push_back(event);
return true;
});
screen.Loop(component);
}