pauseKey {keys} | R Documentation |
Pause or Unpause Keys
Description
These functions allow to pause and unpause keyboard watching
Usage
pauseKey(session = shiny::getDefaultReactiveDomain())
unpauseKey(session = shiny::getDefaultReactiveDomain())
Arguments
session |
The |
Examples
if (interactive()){
library(shiny)
ui <- fluidPage(
useKeys(),
keysInput("keys", letters),
actionButton("pause", "Pause"),
actionButton("unpause", "Unpause")
)
server <- function(input, output, session) {
observeEvent(input$keys, {
print(input$keys)
})
observeEvent(input$pause, {
pauseKey()
})
observeEvent(input$unpause, {
unpauseKey()
})
}
shinyApp(ui, server)
}
[Package keys version 0.1.1 Index]