MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / set_key_down

Method set_key_down

src/InputManager.cpp:342–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void InputManager::set_key_down(const SDL_KeyboardEvent& e, KeyCode kCode, bool acceptingTextInput) {
343 auto& k = keys[kCode];
344 k.held = true;
345 if(acceptingTextInput)
346 main.input_text_key_callback(KeyCallbackArgs{.key = kCode, .down = e.down, .repeat = e.repeat});
347 else
348 main.input_key_callback(KeyCallbackArgs{.key = kCode, .down = e.down, .repeat = e.repeat});
349}
350
351void InputManager::set_key_up(const SDL_KeyboardEvent& e, KeyCode kCode, bool acceptingTextInput) {
352 keys[kCode].held = false;

Callers

nothing calls this directly

Calls 2

input_key_callbackMethod · 0.45

Tested by

no test coverage detected