You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using this code to "remap" tab and shift+tab, now with the updated API, this is obsolete. I've tried to use addkeyevent but when I press the key, it repeatedly advances the cursor in a infinite loop it seems. Clearly I'm doing something wrong, not sure I have the best understanding of these functions.
// Old code:
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow)))
{
g.FocusedTabPressed = true;
}
// New code:
if (ImGui::IsKeyPressed(ImGuiKey_RightArrow))
{
io.AddKeyEvent(ImGuiKey_Tab, true);
ImGui::SetKeyEventNativeData(ImGuiKey_Tab, 9, 0x000F);
io.AddKeyEvent(ImGuiKey_Tab, false);
ImGui::SetKeyEventNativeData(ImGuiKey_Tab, 9, 0x000F);
}
The text was updated successfully, but these errors were encountered:
You'll need to either modify your backend to emit the right key, or modify the input queue after the backend submitted to it and before Dear ImGui has a chance to consume events.
I was using this code to "remap" tab and shift+tab, now with the updated API, this is obsolete. I've tried to use addkeyevent but when I press the key, it repeatedly advances the cursor in a infinite loop it seems. Clearly I'm doing something wrong, not sure I have the best understanding of these functions.
The text was updated successfully, but these errors were encountered: