Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
a38f6f2eaThis file is pinned to the selected release. Download the original to open it in your design tool.
// KeyboardDriver.cpp
module;
#include <cstdint>
module Driver.KeyboardDriver;
namespace Driver
{
bool KeyboardDriver::tick() noexcept
{
return true;
}
KeyState KeyboardDriver::getKeyState(const KeyIdentifier key) const noexcept
{
const KeyState state = keyState.at(static_cast<std::uint8_t>(key));
return state;
}
void KeyboardDriver::setKeyState(KeyIdentifier key, KeyState state) noexcept
{
keyState.at(static_cast<std::uint8_t>(key)) = state;
}
}