MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / isPressed

Method isPressed

src/openboardview/UI/Keyboard/KeyBinding.cpp:17–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17bool KeyBinding::isPressed() const {
18 // Modifiers are held down while non-modifier key is pressed once
19 return std::all_of(modifiers.begin(), modifiers.end(), [](const ImGuiKey &keyModifier){return (keyModifier != ImGuiKey_None) && ImGui::IsKeyDown(keyModifier);}) && (key != ImGuiKey_None) && ImGui::IsKeyPressed(key);
20}
21
22ImGuiKey KeyBinding::getKey() const {
23 return key;

Callers 12

DrawMethod · 0.45
DrawMethod · 0.45
ContextMenuMethod · 0.45
SearchComponentMethod · 0.45
UpdateMethod · 0.45
HandleInputMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected