The Pedigree Project 0.1
mach_virt/Keyboard.cc
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#include "Keyboard.h"
9
10#include "Serial.h"
11
12VirtKeyboard::VirtKeyboard(VirtSerial& serial) : m_Serial(serial), m_DebugState(false) {}
13
15
16void VirtKeyboard::setDebugState(bool enabled) {
17 m_DebugState = enabled;
18}
19
20bool VirtKeyboard::getDebugState() {
21 return m_DebugState;
22}
23
25 return m_DebugState ? m_Serial.read() : 0;
26}
27
29 return m_DebugState ? m_Serial.readNonBlock() : 0;
30}
char getChar() override
char getCharNonBlock() override
void setDebugState(bool enabled) override
void initialise() override