Skip to content

Conversation

DavidBarke
Copy link

This pull requests adds the option nullOnKeyRelease to keysInput and addKeys. If this option is set, the Shiny input will be set to NULL after any of the bound keys is released.

This option enables to detect whether a key is pressed. Consider an actionButton whose action depends on whether ctrl is pressed or not. Without this option, the Shiny input is "ctrl" as long as ctrl has been pressed any time in the past. With this option, the Shiny input is only "ctrl" if ctrl is still pressed and else NULL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant