MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / KeyEventProc

Function KeyEventProc

src/Window_Terminal.c:226–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static void KeyEventProc(KEY_EVENT_RECORD ker) {
227 int key = MapNativeKey(ker.wVirtualKeyCode);
228 int uni = ker.uChar.UnicodeChar;
229
230 if (ker.bKeyDown) {
231 Input_SetPressed(key);
232 if (uni) Event_RaiseInt(&InputEvents.Press, (cc_unichar)uni);
233 } else {
234 Input_SetReleased(key);
235 }
236}
237
238static void MouseEventProc(MOUSE_EVENT_RECORD mer) {
239 switch (mer.dwEventFlags)

Callers 1

ProcessConsoleEventsFunction · 0.85

Calls 4

Input_SetPressedFunction · 0.85
Event_RaiseIntFunction · 0.85
Input_SetReleasedFunction · 0.85
MapNativeKeyFunction · 0.70

Tested by

no test coverage detected