Jams you forgot to say what function "pushkeybordbuffer()" does, and the first
If KeyDown( KEY_UP )
Player\Y = Player\Y -1
Endif
doesn't make sense since you have that function "PlayerMoveUp" unless I misunderstood something.
However, it may be most simple if you add a second valid condition like
where k(c) is a value taken from a file or array.
Plus: I totally agree, with your second point. Also consider that keydown cannot be replaced by "inserted virtual keyhits" and keydown allows multiple keys to be pressed simultanously.
If KeyDown( KEY_UP )
Player\Y = Player\Y -1
Endif
doesn't make sense since you have that function "PlayerMoveUp" unless I misunderstood something.
However, it may be most simple if you add a second valid condition like
if ((keydown(Key_UP)) and (demo=0)) or ((k(c)=KEY_UP) and (demo=1))
where k(c) is a value taken from a file or array.
Plus: I totally agree, with your second point. Also consider that keydown cannot be replaced by "inserted virtual keyhits" and keydown allows multiple keys to be pressed simultanously.