You might try changing to key hit vice keydown see demo code below
; KeyHit Example Press down key with in time period
; to execute code loop
While (1)
; Set up the timer
current=MilliSecs()
; Wait 1 seconds
While MilliSecs() < current+1000
;waiting xx millisec
Wend
hitcount = KeyHit(208)
If (hitcount) Then
Print "Executing code loop - key pressed " + hitcount + " times"
Else
Print "Key not pressed during last time period "
EndIf
Print
Wend
; KeyHit Example Press down key with in time period
; to execute code loop
While (1)
; Set up the timer
current=MilliSecs()
; Wait 1 seconds
While MilliSecs() < current+1000
;waiting xx millisec
Wend
hitcount = KeyHit(208)
If (hitcount) Then
Print "Executing code loop - key pressed " + hitcount + " times"
Else
Print "Key not pressed during last time period "
EndIf
Wend