EnableExplicit Define EventID Define wParam Define lParam Define lpString$ If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) Repeat EventID = WaitWindowEvent() wParam = EventwParam() lParam = EventlParam() If EventID = #WM_KEYUP lpString$ = Space(1024) GetKeyNameText_(lParam, @lpString$, 1024) Debug "Taste: " + lpString$ EndIf If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf