I had an odd bug and just figured out the problem,
and thought to share this

Code: Select all
If InitSprite() = 0 Or InitKeyboard() = 0
MessageRequester("Header Error", "Can't open DirectX 7 or later", 0)
End
EndIf
If OpenWindow(0,0,0,300,200, "bug test",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0),0, 0, 300,200,0,0,0 )
noquit=1
While noquit
we.l=WaitWindowEvent()
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Escape)
noquit=0
EndIf
key.s=KeyboardInkey()
If key<>""
Debug key
EndIf
Delay(1)
Wend
EndIf
EndIf
End
generate a window event and that took me awhile to
find out what was not happening

Probably a non issue when using gadgets though, as they
would detect keypresses themselves.