keyboard.h 904 B

123456789101112131415161718192021222324252627282930313233
  1. // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "hid_core/resources/controller_base.h"
  5. #include "hid_core/resources/keyboard/keyboard_types.h"
  6. namespace Core::HID {
  7. class HIDCore;
  8. class EmulatedDevices;
  9. } // namespace Core::HID
  10. namespace Service::HID {
  11. class Keyboard final : public ControllerBase {
  12. public:
  13. explicit Keyboard(Core::HID::HIDCore& hid_core_);
  14. ~Keyboard() override;
  15. // Called when the controller is initialized
  16. void OnInit() override;
  17. // When the controller is released
  18. void OnRelease() override;
  19. // When the controller is requesting an update for the shared memory
  20. void OnUpdate(const Core::Timing::CoreTiming& core_timing) override;
  21. private:
  22. KeyboardState next_state{};
  23. Core::HID::EmulatedDevices* emulated_devices = nullptr;
  24. };
  25. } // namespace Service::HID