add wrapping function for arrow key