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

Function HandleKeyDown

src/Window_MacClassic.c:325–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325static void HandleKeyDown(EventRecord* event) {
326 if ((event->modifiers & cmdKey))
327 HiliteMenu(0);
328
329 int ch = event->message & 0xFF;
330 int key = (event->message >> 8) & 0xFF;
331
332 if (ch >= 32 && ch <= 127)
333 Event_RaiseInt(&InputEvents.Press, (cc_unichar)ch);
334
335 key = MapNativeKey(key);
336 if (key) Input_SetPressed(key);
337}
338
339static void HandleKeyUp(EventRecord* event) {
340 int key = (event->message >> 8) & 0xFF;

Callers 1

Window_ProcessEventsFunction · 0.85

Calls 3

Event_RaiseIntFunction · 0.85
Input_SetPressedFunction · 0.85
MapNativeKeyFunction · 0.70

Tested by

no test coverage detected