Skip to content

Commit 18cbf37

Browse files
Updated ImGui UWP event handler
1 parent 824e075 commit 18cbf37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SampleBase/src/UWP/ImguiUWPEventHelper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ void ImguiUWPEventHelper::UpdateKeyStates(_In_ Windows::UI::Core::KeyEventArgs^
320320

321321
default:
322322
c = VirtualKeyToChar(args->VirtualKey, io.KeyAlt, io.KeyShift, io.KeyCtrl);
323+
if (c >= 'a' && c <= 'z')
324+
io.AddKeyEvent(static_cast<ImGuiKey>(ImGuiKey_A + (c - 'a')), IsDown);
325+
else if (c >= 'A' && c <= 'Z')
326+
io.AddKeyEvent(static_cast<ImGuiKey>(ImGuiKey_A + (c - 'A')), IsDown);
323327
}
324328
if (IsDown && c >= 0)
325329
io.AddInputCharacter(c);

0 commit comments

Comments
 (0)