Simplify key detection and allow for multidirectional movement