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

mechanism to register keybindings #6

Closed
simonpcouch opened this issue Oct 4, 2024 · 7 comments
Closed

mechanism to register keybindings #6

simonpcouch opened this issue Oct 4, 2024 · 7 comments

Comments

@simonpcouch
Copy link
Owner

I think, ultimately, the interface I'd like to have is something like:

pal("cli", "Ctrl+Shift+C")

To effectively register keybindings in RStudio, this requires that both:

  1. The pal is registered as an add-in
  2. The pal is able to bind that add-in to a keybinding

Neither are officially supported in the IDE. 🫠

@simonpcouch
Copy link
Owner Author

Maybe modifyKeyboardShortcuts at https://docs.posit.co/ide/server-pro/reference/rstudio_ide_commands.html via rstudioapi::executeCommand().

@simonpcouch
Copy link
Owner Author

This file shows an example of setting default keybindings via json—pal could just use the traditional add-in mechanism and then apply this kind of json on restart?

https://github.com/biof309/spring2019/blob/884b074e7cdc8ec8e8e6b58a9d37c3996c6ba1fd/setup/rstudio_bindings.json#L2

@simonpcouch
Copy link
Owner Author

@simonpcouch
Copy link
Owner Author

posit-dev/positron#1313

@simonpcouch
Copy link
Owner Author

simonpcouch added a commit that referenced this issue Oct 4, 2024
registration and keybindings are as in clipal, related to #6
@simonpcouch
Copy link
Owner Author

Closing in favor of #22, though the linked issues may be helpful there.

@simonpcouch
Copy link
Owner Author

Reopening-- https://github.com/gadenbuie/shrtcts.

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

No branches or pull requests

1 participant