Skip to content
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

Its possible to block ALT navigation and focus? #5292

Closed
KennyProgrammer opened this issue May 7, 2022 · 4 comments
Closed

Its possible to block ALT navigation and focus? #5292

KennyProgrammer opened this issue May 7, 2022 · 4 comments
Labels
nav keyboard/gamepad navigation

Comments

@KennyProgrammer
Copy link

Hey everyone!

Its possible to block ALT navigation and focus on window? Its very useful and great feature but problem because in my application ALT key already using for rotation camera and other edit modes.
And when I click on the ALT to start rotating the camera, I have an Imgui window that I don't want to choose, and it turns out when I often click on the alt when the camera rotates, the windows are not highlighted, and this causes discomfort. I tried using ImGuiWindowFlags_NoNav or ImGuiWindowFlags_NavFocus but this only disables appearing window when press on CTRL+Tab.

image image

So can i somehow disable this or change key navigation from ALT to only Right-ALT or other key?

@ocornut
Copy link
Owner

ocornut commented May 9, 2022

Are those Docked windows or a manually submitted tab bar ?

I am currently working on a solution for this and hope to publish it in May.

@ocornut ocornut added the nav keyboard/gamepad navigation label May 9, 2022
@KennyProgrammer
Copy link
Author

Thanks for the reply. Yes, this is a docked window . But it seems to me that when you press ALT, even a separate window will be highlighted.
I'm not sure about the manually sent tab bars because I haven't checked this case.

@ocornut
Copy link
Owner

ocornut commented Mar 10, 2023

I've posted an answer for this in #3560
You can now generally use SetItemKeyOwner(ImGuiMod_Alt, ...) or SetKeyOwner(ImGuiMod_Alt, ...) to claim ownership of a key.

@ocornut ocornut closed this as completed Mar 10, 2023
@KennyProgrammer
Copy link
Author

KennyProgrammer commented Mar 10, 2023

Its been late, but thanks anyway :) I already fixed this by modifying some ImGui internal code and add flag or something (dangerous), but if now ImGui has public API i revisit this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nav keyboard/gamepad navigation
Projects
None yet
Development

No branches or pull requests

2 participants