Alt+Shift (or Shift+Alt) combination is the default shortcut for switching your keyboard language on win32.
This is very frustrating when you're typing inside an InputText widget and you want to change your keyboard language and then your input no longer has the focus.
There should be a check for the shift key not being held while checking for the KeyAlt.
Adding these lines to
worked for me:
if (g.NavWindowingToggleLayer && io.KeyShift)
g.NavWindowingToggleLayer = false;
At first I tried replacing the code in
|
if (io.KeyAlt && !io.KeyCtrl) |
to:
if (io.KeyAlt && !io.KeyCtrl && !io.KeyShift)
but that only fixed the problem when you held shift key first and then pressed the alt key. (The problem was still there by holding the alt key first and then pressing the shift key for some reason, both combinations are correct)
If the code that I use to solve this problem is correct and approved I'll go ahead and make the PR.
(I'm also not sure about mac or other operating systems but if this is exclusive to win32 maybe we can just put it inside a macro check)
Alt+Shift (or Shift+Alt) combination is the default shortcut for switching your keyboard language on win32.
This is very frustrating when you're typing inside an InputText widget and you want to change your keyboard language and then your input no longer has the focus.
There should be a check for the shift key not being held while checking for the KeyAlt.
Adding these lines to
imgui/imgui.cpp
Line 9129 in c7529c8
At first I tried replacing the code in
imgui/imgui.cpp
Line 9123 in c7529c8
to:
if (io.KeyAlt && !io.KeyCtrl && !io.KeyShift)but that only fixed the problem when you held shift key first and then pressed the alt key. (The problem was still there by holding the alt key first and then pressing the shift key for some reason, both combinations are correct)
If the code that I use to solve this problem is correct and approved I'll go ahead and make the PR.
(I'm also not sure about mac or other operating systems but if this is exclusive to win32 maybe we can just put it inside a macro check)