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

Function OnKeyEvent

src/Window_SDL3.c:226–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static void OnKeyEvent(const SDL_Event* e) {
227 cc_bool pressed = e->key.down == true;
228 int key = MapNativeKey(e->key.key);
229 if (key) Input_Set(key, pressed);
230}
231
232static void OnMouseEvent(const SDL_Event* e) {
233 cc_bool pressed = e->button.down == true;

Callers 1

Window_ProcessEventsFunction · 0.70

Calls 2

Input_SetFunction · 0.85
MapNativeKeyFunction · 0.70

Tested by

no test coverage detected