limit keydown to arrow keys and spacebar