If I get what you are trying to do.
Maybe have a variable that say direction e.g.:
1 2 3
\|/
4-+-5
/|\
6 7 8
The key check routine will make sure the direction variable is 0 before setting it to a direction
In your main loop, have a switch style statement that will look at the direction variable, if it is set to a direction it will move the sprite one step in that direction. The routine will then check if it is in the correct spot in that grid position, If it is then it will set the direction variable to 0 causing the sprite to stop and the key routine will be able to set the direction again.
If you want free movement (I.e. not needing to move to a the centre of each square) then just take the direction check out of the key routine and you will be able to move freely around.
Make sure you check diagonals with 2 keys if you intend to use it.
E.g. Upkey is pressed and LeftKey is pressed then direction = 1
DownKey is pressed and RightKey is pressed then direction = 8
Hope it helps.
Jas
----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"