How to insert slides into prev and next buttons for ioslides with rmarkdown

The code below iterates through the slide titles when using the button, but I do not know how to insert the respective slides into "slide 1", "slide 2"...

The reason why I need a button is that the arrow keys that move to the next slide do not work when I make a rdiobutton selection. What happens is that pressing the arrow keys selects the next radio button in the list and the ability to move the next slide using the arrow keys is desabled. I have been looking for some other ways of advancing the presentation (other short cuts), but I have not been able to find any in rmarkdown.

slideIndex <- reactiveVal(1)

observeEvent(input$nexts, {
    if (slideIndex() < 3) slideIndex(slideIndex() + 1)
  })
 
  observeEvent(input$prev, {
    if (slideIndex() > 1) slideIndex(slideIndex() - 1)
  })
  
   actionButton("prev", "Previous Slidde")
   actionButton("nexts", "Next Slide")
   uiOutput("slides")
  output$slides <- renderUI({
    slideContent <- c(
      "# Slide 1\nINTRODUCTION",
      "# Slide 2\nRADIO BUTTON LIST",
      "# Slide 3\nDATA SET SELECTED",
      "# Slide 4\nDROP DOWN MENU"
    )
    htmltools::HTML(slideContent[slideIndex()])
  })

I tried to solve the problem by desabling the radiobutton once a selection is made, but it does not work.

radioButtons("inDs", "Select dataset:", choices = names(datasets))
observe({
    x <- input$inDs

    # Can also set the label and select items
    updateRadioButtons(session, "inDs",
      label = paste("radioButtons label", x),
      choices = x,
      selected = x
   )
})

This code works.

radioButtons("inDs", "Select dataset:", choices = names(datasets))
 useShinyjs()

  actionButton("disable_btn", "Disable Radio Buttons")
   observeEvent(input$disable_btn, {
    shinyjs::disable("choices")
  })