-
-
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
Change Ctrl+Tab combo #4828
Comments
@ocornut sorry you've opened it too late >_< |
Are you talking about Ctrl-Tab and not Alt-tab ? Your description keeps going back and forth between both.. |
Maybe leave Ctrl and add option to config to choose between default Tab and other keys? Or hardcode 2-keys combo, something like: io.ConfigDockingShortcutFirstKey = Key::Ctrl;
io.ConfigDockingShortcutSecondKey = Key::Q; If you wanna single-key tab opening then something like: io.ConfigDockingShortcutFirstKey = Key::Shift;
io.ConfigDockingShortcutSecondKey = Key::Shift; Or maybe use array for it... (I know it lead to huge issue of #456 but anyway could be discussed (maybe temporary solution until shortcut api)) |
imgui.cpp const bool start_windowing_with_keyboard = allow_windowing && !g.NavWindowingTarget && io.KeyCtrl && IsKeyPressed(ImGuiKey_Home); ↑ change it |
perhaps this is a proper thread to ask. |
There is no way to disable this at the moment. It would also be better if you created a new issue. Answering new issues is no bother, scattering useful information in mostly unrelated issues does not help information discoverability later on. |
thanks @rokups . and next time i make a new thread, at least my issue is almost the same as of the thread title (or at least the solution to that would solve mine too up to some level). |
I think it's fine in the same issue since doing the earlier would likely allow the later. Tho by the look of it, the later (disable) may be doable soon. I'll post when I have updates. |
@ocornut , thanks, disabling would be great and enough for me. |
Wouldn't it be enough to check if keyboard/gamepad navigation is even enabled before showing the window? imgui.cpp line 10857: const bool start_windowing_with_gamepad = allow_windowing && !g.NavWindowingTarget &&
IsNavInputTest(ImGuiNavInput_Menu, ImGuiNavReadMode_Pressed) **&&
io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad**;
const bool start_windowing_with_keyboard = allow_windowing && !g.NavWindowingTarget &&
io.KeyCtrl && IsKeyPressed(ImGuiKey_Tab) **&&
io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard**; |
…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().
We now have a more unified chord/shortcut systems and a solution for this. While having discussions with other people I was also asked about remapping and specifically for the CTRL+Tab system.
For this reason it is reasonable to allow remapping this shortcut and now that it is easier to do, I've added an experimental/internal way to do it. // Note this is in the Dear ImGui context, NOT in ImGuiIO yet
g.ConfigNavWindowingKeyNext = ImGuiMod_Ctrl | ImGuiKey_Tab;
g.ConfigNavWindowingKeyPrev = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab; This works:
If both are setup, it is currently required that they share a same modifier for "holding".
The "prev" shortcut doesn't work correctly as it will cycle between two windows. Closing this for now but curious about your feedback and I expect to improve it once we have users. |
Also adds test for ensuring Ctrl+Shift+Tab works in the typical case. Functional test for ocornut/imgui#4828
Also adds test for ensuring Ctrl+Shift+Tab works in the typical case. Functional test for ocornut/imgui#4828
…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)
Based on #3255, can't reopen issue so I've created the new one:
Version/Branch of Dear ImGui:
Version: 1.86
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: webGL
Compiler: em++
Operating System: V8
My Issue/Question:
Ctrl+tab changes tab in browser
Proof: https://stackoverflow.com/questions/56835762/how-to-disable-ctrltab-in-javascript
Proof: https://stackoverflow.com/questions/8195175/javascript-code-to-press-ctrltab
So I need to be able to change combo from Ctrl+Tab to something else
i.e. IntelliJ uses Shift+Shift for this
i.e. IDE's uses Shift+Space for intellisense so it shoud be conveniently too
The text was updated successfully, but these errors were encountered: