I have read a fair bit of this thread and can't put my finger on the problem.
CLEAR ENTRY BUFFER
while inkey$() = ""
` Do some stuff
SYNC
endwhile
That code should clear the entry buffer

, and wait until you press a key.
I think the problem must be related to the `lots of stuff` you mention.
Heres a couple of points I will note.
1. "Clear entry buffer" will not affect the value of inkey$ and is unneeded with your supplied code (of course it may be needed dependent on the rest of the code.).
2. "Inkey$" detects one key press only and should revert to 0 on the next loop of your program, if the key is released.
So I am not sure what the problem is exactly. Everyone else seems to know what it is, but I am in the dark. I have played around a fair bit with strings and such in DB, with various projects I have done, so I am sure I could help. If it is simply a key repeat problem I am sure it will be easy enough to squash it.
I read you have worked round it, but I am sure you would prefer to work through it if possible
@GreenGandalf, you surprise me, but you obviously have more interest in shaders than text input lol. Shaders are far more sexy

Clear entry buffer does what it says on the tin. You simply have to use the entry$ command, rather than input for instance. Here is a quick example.
do
text 0,0,entry$(1)
if returnkey()=1
gosub entered
ENDIF
sync
loop
entered:
entered$=entry$(1)
clear entry buffer
cls
return
You will see it does work

Indeed, it is the only way to do text entry, in standard DB, IMO.
Anyway more info needed to solve this, whatever it is exactly!!
http://s6.bitefight.org/c.php?uid=103081