/* * Copyright (c) 2018-2020, Andreas Kling * Copyright (c) 2023, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Kernel { class PS2KeyboardDevice final : public SerialIODevice { friend class DeviceManagement; public: static ErrorOr> try_to_initialize(SerialIOController const&, SerialIOController::PortIndex port_index, KeyboardDevice const&); virtual ~PS2KeyboardDevice() override; ErrorOr initialize(); // ^SerialIODevice virtual void handle_byte_read_from_serial_input(u8 byte) override; private: PS2KeyboardDevice(SerialIOController const&, SerialIOController::PortIndex port_index, KeyboardDevice const&); bool m_has_e0_prefix { false }; NonnullRefPtr const m_keyboard_device; }; }