InstallPopup doesn't cause your code to wait: it just installs and displays a modal dialog box. I typically use InstallPopup in conjunction with GetUserEvent and RemovePopup.
GetUserEvent with Wait Mode set to wait will wait until an EVENT_COMMIT is generated. GetUserEvent then returns the panel and control that generated the EVENT_COMMIT.
If your keyboard panel popup has buttons like OK or ENTER or CANCEL, you need to put GetUserEvent in a loop: you'll get EVENT_COMMIT's on letters or numbers clicked as well as on OK (etc.). In your loop, if the control that generated EVENT_COMMIT is not OK, ENTER, or CANCEL, it must be a letter or number: use it to build your string. If the EVENT_COMMIT is from OK or ENTER, return to your calling routine and RemovePopup(0). If EVE
NT_COMMIT is from CANCEL, clear the string (e.g. sMyString[0] = '\0';) before returning.
You may want to set the Shortcut Key for OK or ENTER to Enter, and the Shortcut Key for CANCEL to Esc.