ImGuiManager: Fix tab key handling

This commit is contained in:
Stenzek 2025-04-17 19:44:15 +10:00
parent c9ae4dcd0f
commit 9c819d9676
No known key found for this signature in database

View File

@ -448,7 +448,8 @@ void ImGuiManager::SetKeyMap()
const char* alt_name; const char* alt_name;
}; };
static constexpr KeyMapping mapping[] = {{ImGuiKey_LeftArrow, "Left", nullptr}, static constexpr KeyMapping mapping[] = {
{ImGuiKey_LeftArrow, "Left", nullptr},
{ImGuiKey_RightArrow, "Right", nullptr}, {ImGuiKey_RightArrow, "Right", nullptr},
{ImGuiKey_UpArrow, "Up", nullptr}, {ImGuiKey_UpArrow, "Up", nullptr},
{ImGuiKey_DownArrow, "Down", nullptr}, {ImGuiKey_DownArrow, "Down", nullptr},
@ -471,6 +472,9 @@ void ImGuiManager::SetKeyMap()
{ImGuiKey_RightAlt, "RightAlt", nullptr}, {ImGuiKey_RightAlt, "RightAlt", nullptr},
{ImGuiKey_RightSuper, "RightSuper", nullptr}, {ImGuiKey_RightSuper, "RightSuper", nullptr},
{ImGuiKey_Menu, "Menu", nullptr}, {ImGuiKey_Menu, "Menu", nullptr},
{ImGuiKey_Tab, "Tab", nullptr},
// Hack: Report Qt's "Backtab" as Tab, we forward the shift so it gets mapped correctly
{ImGuiKey_Tab, "Backtab", nullptr},
{ImGuiKey_0, "0", nullptr}, {ImGuiKey_0, "0", nullptr},
{ImGuiKey_1, "1", nullptr}, {ImGuiKey_1, "1", nullptr},
{ImGuiKey_2, "2", nullptr}, {ImGuiKey_2, "2", nullptr},