Hi Markus,
If getkey is not pressed, what is the return value ?
It isn't zero!
e.g
local press=0
repeat
k=getkey()
if k==32 and press==0 then
color(255,255,255)
drawtext (10,10,"HELLO")
press=1
end
sync()
if k==0 then press=0; end
until k==27
closewindow()