I don't see that it doesn't work like you wanted... I plonked it in a simple framework and it works... try this:
OH FYI use lower case letters {code} not {CODE} :)
-RZ
Graphics3D 800,600,32,1 SetBuffer BackBuffer() Repeat FlushKeys If KeyDown(57) Print "Key Down" While KeyDown(57) Wend Print "Key Up" EndIf Until KeyDown(1) End UpdateWorld() RenderWorld() Flip End
OH FYI use lower case letters {code} not {CODE} :)
-RZ