keys
keys copied to clipboard
Add nullOnKeyRelease option
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.