rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
168 stars 35 forks source link

[Feature request] automatic add keyboard shortcuts #181

Open dokato opened 4 years ago

dokato commented 4 years ago

What would be nice to have is some function that registers a default keyboard shortcut for given addin.

GegznaV commented 4 years ago

@dokato, you may write a function that modifies/creates a JSON file, which is used for storing hotkeys for addins. In RStudio 1.2, it was:

path.expand("~/.R/rstudio/keybindings/addins.json")

For RStudio 1.3, there were some changes in places for saving user settings, so information in these resources might be helpful:

But as a user, I would not be happy if any package sets and especially overwrites shortcut keys without my consent.


Still, I agree that this kind of functionality directly via rstudioapi would be helpful.