Closed tylerlittlefield closed 4 years ago
@ColinFay In case you wanted to review before I merge.
This PR adds:
keysRecordInput
inputId
recordKeys
Expected usage is to initialize a keysInput and keysRecordInput so that you can record keys and add them with addKeys:
keysInput
addKeys
library(shiny) library(keys) ui <- fluidPage( useKeys(), keysRecordInput("recorder"), keysInput("keys", "command+shift+k"), actionButton("record", "Record keys") ) server <- function(input, output, session) { observeEvent(input$record, { print("recording keys...") recordKeys("recorder") }) observeEvent(input$recorder, { print("adding keys...") addKeys("keys", input$recorder) }) observeEvent(input$keys, { print(input$keys) }) } shinyApp(ui, server)
@ColinFay In case you wanted to review before I merge.
This PR adds:
keysRecordInput
: a hidden input that requires aninputId
recordKeys
: a function for recording the keys from serverExpected usage is to initialize a
keysInput
andkeysRecordInput
so that you can record keys and add them withaddKeys
: