MCPcopy Create free account
hub / github.com/SFML/SFML / isKeyPressed

Function isKeyPressed

src/SFML/Window/DRM/InputImpl.cpp:550–558  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

548{
549////////////////////////////////////////////////////////////
550bool isKeyPressed(Keyboard::Key key)
551{
552 const std::lock_guard lock(inputMutex);
553 if ((static_cast<int>(key) < 0) || (static_cast<int>(key) >= static_cast<int>(keyMap.size())))
554 return false;
555
556 update();
557 return keyMap[key];
558}
559
560
561////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

updateFunction · 0.70

Tested by

no test coverage detected