added spacebar keyboard control for toggling device orientation