MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / IsKeyDown

Method IsKeyDown

engine/Poseidon/Input/InputSubsystem.cpp:616–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614
615bool InputSubsystem::IsKeyDown(SDL_Scancode sc) const
616{
617 int idx = static_cast<int>(sc);
618 if (idx < 0 || idx >= SDL_SCANCODE_COUNT)
619 return false;
620 return GInput.keyboard.keys[idx] > 0.0f;
621}
622
623bool InputSubsystem::IsKeyPressed(SDL_Scancode sc) const
624{
625 int idx = static_cast<int>(sc);

Callers 15

SimulateMethod · 0.80
DrawFinishTextsMethod · 0.80
KeyDownMethod · 0.80
OnLButtonClickMethod · 0.80
OnLButtonUpMethod · 0.80
OnMouseHoldMethod · 0.80
OnSimulateMethod · 0.80
OnLButtonClickMethod · 0.80
OnKeyDownMethod · 0.80
FindSignMethod · 0.80
OnLButtonUpMethod · 0.80
OnLButtonClickMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected