MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / handleKeyDown

Method handleKeyDown

Source/UserInput/keyboard.cpp:232–241  ·  view source on GitHub ↗

Handle key presses

Source from the content-addressed store, hash-verified

230
231// Handle key presses
232void Keyboard::handleKeyDown(SDL_Keysym the_key) {
233 KeyStatus &key = keys[the_key.scancode];
234 if (!key.down) {
235 key.down = true;
236 key.pressed = true;
237 }
238 last_key = the_key;
239 last_key_delay = 0.6f;
240 addKeyQueue(the_key);
241}
242
243void Keyboard::handleKeyDownFirst(SDL_Keysym the_key) {
244 addKeyCodeBufferItem(the_key);

Callers 1

HandleEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected