Backends: GLFW, SDL: report Windows key (io.KeySuper) as always released.

Neither GLFW nor SDL can correctly report the key release in every cases (e.g. when using Win+V) causing problems with some widgets. The next release of GLFW (3.4+) will have a fix for it. However since it is both difficult and discouraged to make use of this key for Windows application anyway, we just hide it. (#2976)
This commit is contained in:
omar
2020-01-17 15:18:33 +01:00
parent e499497ec5
commit 8bcac7d95c
4 changed files with 13 additions and 4 deletions

View File

@ -115,7 +115,11 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
io.KeyShift = ((SDL_GetModState() & KMOD_SHIFT) != 0);
io.KeyCtrl = ((SDL_GetModState() & KMOD_CTRL) != 0);
io.KeyAlt = ((SDL_GetModState() & KMOD_ALT) != 0);
#ifdef _WIN32
io.KeySuper = false;
#else
io.KeySuper = ((SDL_GetModState() & KMOD_GUI) != 0);
#endif
return true;
}
}