Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| 1659 | |
| 1660 | // Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. |
| 1661 | void ImGuiIO::ClearInputKeys() |
| 1662 | { |
| 1663 | ImGuiContext& g = *Ctx; |
| 1664 | for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++) |
| 1665 | { |
| 1666 | if (ImGui::IsMouseKey((ImGuiKey)key)) |
| 1667 | continue; |
| 1668 | ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN]; |
| 1669 | key_data->Down = false; |
| 1670 | key_data->DownDuration = -1.0f; |
| 1671 | key_data->DownDurationPrev = -1.0f; |
| 1672 | } |
| 1673 | KeyCtrl = KeyShift = KeyAlt = KeySuper = false; |
| 1674 | KeyMods = ImGuiMod_None; |
| 1675 | InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters(). |
| 1676 | } |
| 1677 | |
| 1678 | void ImGuiIO::ClearInputMouse() |
| 1679 | { |
no test coverage detected