implement insert by middle mouse button