Use arrow keys to move. Don't touch the beetles or ghost or you will lose. Get the cheese. You cannot go through walls no matter what.
Coding Games in Scratch was my book that this idea came from.