MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / ReadKey

Function ReadKey

Kernel/src/arch/x86_64/keyboard.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 unsigned short keyCount = 0;
18
19 bool ReadKey(uint8_t* key){
20 if(keyCount <= 0) return false;
21
22 *key = keyQueue[keyQueueStart];
23
24 keyQueueStart++;
25
26 if(keyQueueStart >= KEY_QUEUE_SIZE) {
27 keyQueueStart = 0;
28 }
29
30 keyCount--;
31
32 return true;
33 }
34
35 class KeyboardDevice : public Device{
36 public:

Callers 1

ReadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected