functionality of left and right keys on search