Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nullOnKeyRelease option #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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