MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / onKeyDown

Function onKeyDown

source/kernel/devs/devinput.cpp:832–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830}
831
832void onKeyDown(U32 code) {
833 if (!keyboardEvents) {
834 return;
835 }
836 U64 time = KSystem::getSystemTimeAsMicroSeconds();
837 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(keyboardEvents->bufferCond);
838
839 if (code == 0)
840 return;
841 queueEvent(keyboardEvents, K_EV_KEY, code, 1, time);
842 postSendEvent(keyboardEvents, time);
843 BOXEDWINE_CONDITION_SIGNAL_ALL(keyboardEvents->bufferCond);
844}
845
846void onKeyUp(U32 code) {
847 if (!keyboardEvents) {

Callers 1

handlSdlEventMethod · 0.85

Calls 2

queueEventFunction · 0.85
postSendEventFunction · 0.85

Tested by

no test coverage detected