aboutsummaryrefslogtreecommitdiff
path: root/ttwhy/scanners/events.cppm
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-06-19 19:25:30 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-06-19 19:25:30 +0200
commit7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba (patch)
treea2c2adc18bc5bdaa1e1e2f80e75d1acbce78d7bb /ttwhy/scanners/events.cppm
parentb198d40e35050c8692296f06acedfaf5e3c8a023 (diff)
downloadttwhy-7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba.tar.xz
ttwhy-7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba.zip
lib: clean up structure
Diffstat (limited to 'ttwhy/scanners/events.cppm')
-rw-r--r--ttwhy/scanners/events.cppm47
1 files changed, 47 insertions, 0 deletions
diff --git a/ttwhy/scanners/events.cppm b/ttwhy/scanners/events.cppm
new file mode 100644
index 0000000..3e2f4f0
--- /dev/null
+++ b/ttwhy/scanners/events.cppm
@@ -0,0 +1,47 @@
+module;
+
+#include <variant>
+
+export module ttwhy.scanners:events;
+
+namespace ttwhy::scanners
+{
+ export enum class control_key
+ {
+ enter,
+ escape,
+ tab,
+ backspace,
+ };
+
+ export enum class navigation_key
+ {
+ up,
+ down,
+ left,
+ right,
+ home,
+ end,
+ delete_key,
+ insert_key,
+ page_up,
+ page_down,
+ };
+
+ export struct character_event
+ {
+ char value;
+ };
+
+ export struct control_event
+ {
+ control_key key;
+ };
+
+ export struct navigation_event
+ {
+ navigation_key key;
+ };
+
+ export using input_event = std::variant<character_event, control_event, navigation_event>;
+} // namespace ttwhy::scanners