No problem.

What if you try it like this (it's just a sketch):

[pascal]Procedure Timer;
begin
If OnKeyPress then DoMove(KeyPressed);
// In this case OnKeyPress is a function that only returns whether a key is pushed or not (true and false)
// In this case KeyPressed is a function that returns the number/letter which is pressed
end;

Procedure DoMove(Key: string);
begin
If Key = 'w' then begin
end;
end;[/pascal]