check if a cursor is within the number
check input