implement keyboard controls and gestures