differentiating direction and keypress