#pragma once #include "interfaces/input.hpp" #include #include #include class UserInputObserver : public IUserInputObserver, public yacppdic::AutoWirable { public: UserInputObserver() noexcept = default; void listen() noexcept override; auto is_key_pressed(Key key) noexcept -> bool override; [[nodiscard]] auto get_currently_pressed_key() const noexcept -> Key override; void clear_currently_pressed() noexcept override; private: Key _currently_pressed{}; std::mutex _currently_pressed_mutex; };