21 #include "pedigree/kernel/machine/Device.h" 22 #include "pedigree/kernel/machine/HidInputManager.h" 23 #include "pedigree/kernel/machine/KeymapManager.h" 24 #include "pedigree/kernel/machine/Machine.h" 27 #include "pedigree/kernel/debugger/Debugger.h" 29 #ifdef TRACK_PAGE_ALLOCATIONS 30 #include "pedigree/kernel/debugger/commands/AllocationCommand.h" 35 #include "pedigree/kernel/debugger/commands/SlamCommand.h" 38 #include "pedigree/kernel/core/SlamAllocator.h" 49 HostedKeyboard::HostedKeyboard() : m_bDebugState(false)
54 while (read(0, buf, 64) == 64)
59 HostedKeyboard::~HostedKeyboard()
68 t.c_lflag &= ~(ICANON | ECHO);
69 tcsetattr(0, TCSAFLUSH, &t);
80 ssize_t n = read(0, buf, 1);
94 ssize_t n = read(0, buf, 1);
102 m_bDebugState = enableDebugState;
105 bool HostedKeyboard::getDebugState()
107 return m_bDebugState;
119 void HostedKeyboard::blocking(
bool enable)
121 int flags = fcntl(0, F_GETFL);
127 flags &= ~O_NONBLOCK;
130 fcntl(0, F_SETFL, flags);
virtual void initialise()
virtual char getCharNonBlock()
virtual void setDebugState(bool enableDebugState)
virtual void setLedState(char state)
virtual char getLedState()