-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable CTRL+Tab switcher popup? #5641
Comments
Currently you cannot without modifying Dear ImGui. Disabling completely is something Omar has stated would fall out of #4828
Pass
The feature its self has been there for ages, but previously it was tied to keyboard navigation. It was enabled by default in 8ce23b3 as a part of #4023. |
We have a change hopefully coming in 1.89 which will make it possible to disable ctrl-tab among other things.
|
The reason the main menu bar doesn't use |
Thanks for all the info! After digging through imgui.cpp I successfully disabled ctrl+tab by setting |
…2891, #3370, #4828, #5108, #5242, #5641) - Added SetKeyOwner(), SetItemKeyOwner(), TestKeyOwner(). - Added new IsKeyXXX IsMouseXXX functions with ImGuID owner_id and flags. - Obsoleted SetItemUsingMouseWheel(). (#2891) - Removed IsKeyPresseedEx() which was a recent internal addition 2022-07-08 deemed to be temporary exactly for this. - Added ImGuiButtonFlags_NoSetKeyOwner, ImGuiButtonFlags_NoTestKeyOwner - Added ImGuiSelectableFlags_NoSetKeyOwner. - Added ImGuiInputFlags_LockThisFrame, ImGuiInputFlags_LockUntilRelease for for SetKeyOwner(), SetItemKeyOwner(). - Added ImGuiInputFlags_CondXXX values for SetItemKeyOwner().
Pushed a few new features and you can now do: #include "imgui_internal.h"
// Disable CTRL+Tab shortcuts (global): assign a "None" route to steal the route to our two shortcuts
ImGui::SetShortcutRouting(ImGuiMod_Ctrl | ImGuiKey_Tab, ImGuiKeyOwner_None);
ImGui::SetShortcutRouting(ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab, ImGuiKeyOwner_None); or // Disable CTRL+Tab shortcuts (if focused): assign a "None" route to steal the route to our two shortcuts, applies focus testing so will only apply if window is in focus chain
ImGui::SetShortcutRouting(ImGuiMod_Ctrl | ImGuiKey_Tab, ImGuiKeyOwner_None, ImGuiInputFlags_RouteFocused);
ImGui::SetShortcutRouting(ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab, ImGuiKeyOwner_None, ImGuiInputFlags_RouteFocused); However, as per #4828 we made the exception to allow remapping CTRL+Tab windowing system. Therefore technically the right shortcut needs to be pulled: if (g.ConfigNavWindowingKeyNext)
ImGui::SetShortcutRouting(g.ConfigNavWindowingKeyNext, ImGuiKeyOwner_None);
if (g.ConfigNavWindowingKeyPrev)
ImGui::SetShortcutRouting(g.ConfigNavWindowingKeyPrev, ImGuiKeyOwner_None); But this is only if you want to both allow remapping AND disabling of the shortcuts. |
…2637, ocornut#2620, ocornut#2891, ocornut#3370, ocornut#4828, ocornut#5108, ocornut#5242, ocornut#5641) - Added SetKeyOwner(), SetItemKeyOwner(), TestKeyOwner(). - Added new IsKeyXXX IsMouseXXX functions with ImGuID owner_id and flags. - Obsoleted SetItemUsingMouseWheel(). (ocornut#2891) - Removed IsKeyPresseedEx() which was a recent internal addition 2022-07-08 deemed to be temporary exactly for this. - Added ImGuiButtonFlags_NoSetKeyOwner, ImGuiButtonFlags_NoTestKeyOwner - Added ImGuiSelectableFlags_NoSetKeyOwner. - Added ImGuiInputFlags_LockThisFrame, ImGuiInputFlags_LockUntilRelease for for SetKeyOwner(), SetItemKeyOwner(). - Added ImGuiInputFlags_CondXXX values for SetItemKeyOwner().
Note the removed comments (hence not squashing) Amend 4448d97 (ocornut#456, ocornut#2637, ocornut#2620, ocornut#2891, ocornut#3370,, ocornut#4828, ocornut#5108, ocornut#5242, ocornut#5641)
…versions of IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(). (#456) For several reasons those changes makes sense. They are being made because making some of those API public. Only past users of imgui_internal.h with the extra parameters will be affected. Added asserts for valid flags in various functions to detect _some_ misuses, BUT NOT ALL. Amend 4448d97 (#456, #2637, #2620, #2891, #3370, #4828, #5108, #5242, #5641)
I'm on commit
77637fd9
.I'm building an IDE-like program and relying heavily on docking to draw the main user interface. I have an "empty section" where I draw my own application. Before, when the user did not have any tab/window focused, I would assume they had the "empty section" focused, and handle Ctrl+Tab manually.
I'm not sure when this happened, but recently I upgraded to commit
77637fd9
. Now when the user presses Ctrl+Tab, no matter where they are, this tab switcher popup thingy opens.Questions in descending order of optimality:
Thanks!
The text was updated successfully, but these errors were encountered: