Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| 1471 | |
| 1472 | // Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. |
| 1473 | void ImGuiIO::ClearInputKeys() |
| 1474 | { |
| 1475 | #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO |
| 1476 | memset(KeysDown, 0, sizeof(KeysDown)); |
| 1477 | #endif |
| 1478 | for (int n = 0; n < IM_ARRAYSIZE(KeysData); n++) |
| 1479 | { |
| 1480 | if (ImGui::IsMouseKey((ImGuiKey)(n + ImGuiKey_KeysData_OFFSET))) |
| 1481 | continue; |
| 1482 | KeysData[n].Down = false; |
| 1483 | KeysData[n].DownDuration = -1.0f; |
| 1484 | KeysData[n].DownDurationPrev = -1.0f; |
| 1485 | } |
| 1486 | KeyCtrl = KeyShift = KeyAlt = KeySuper = false; |
| 1487 | KeyMods = ImGuiMod_None; |
| 1488 | InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters(). |
| 1489 | } |
| 1490 | |
| 1491 | void ImGuiIO::ClearInputMouse() |
| 1492 | { |
no test coverage detected