added event handler for key down in the main form (KeyPreview property set to true), forbade user to move against current direction and to change direction in paused state