diff options
Diffstat (limited to 'ttwhy/scanners/events.cppm')
| -rw-r--r-- | ttwhy/scanners/events.cppm | 47 |
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 |
