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

Overlap between R shortcuts / keybindings and positron ones #2423

Closed
EmilHvitfeldt opened this issue Mar 11, 2024 · 7 comments
Closed

Overlap between R shortcuts / keybindings and positron ones #2423

EmilHvitfeldt opened this issue Mar 11, 2024 · 7 comments
Labels
bug Something isn't working lang: r

Comments

@EmilHvitfeldt
Copy link

Positron Version:

Positron Version: 2024.03.0 (Universal) build 893
Code - OSS Version: 1.87.0
Commit: 864257d
Date: 2024-03-05T03:24:32.501Z
Electron: 27.3.2
ElectronBuildId: undefined
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.3.0

Steps to reproduce the issue:

  1. try different keybindings, Explorer Cmd + Shift + E, Run and debug Cmd + Shift + D
Kapture.2024-03-11.at.11.44.49.mp4

What did you expect to happen?

Some of the listed keybindings on hover doesn't work because they are superseded by R package development commands.

I don't know if it would possible to hide the incorrect shortcuts.

As far as I can tell, I don't have any custom keybindings, so this is vanilla

Were there any error messages in the output or Developer Tools console?

Nope

@EmilHvitfeldt EmilHvitfeldt added the bug Something isn't working label Mar 11, 2024
@juliasilge juliasilge added this to the Release Candidate milestone Mar 11, 2024
@juliasilge
Copy link
Contributor

This is a duplicate of #2150 but maybe the right call is to move these keyboard shortcuts to the RStudio Keymap extension. This would not get rid of the actual problem (on hover, you see a keybinding that does not actually apply in your current situation) but it would mean that a) folks opt IN to using it and b) fewer users total would be in this situation.

@lionel-
Copy link
Contributor

lionel- commented Apr 5, 2024

Notes from the duplicate issue that I filed at #2673:

We currently define a bunch of "cmd+shift+" bindings in the R extension. These are high value bindings that are more likely to cause conflicts with existing Code/Positron bindings, for instance we bind "cmd+shift+e" to check a package inside R projects which conflicts with the regular keybinding to show the file explorer.

Now that we have an RStudio keymap extenstion (#2067) I think this frees us to come up with default keybindings that are less likely to conflict with the larger ecosystem. We could:

  • Move keybindings such as Cmd+Shift+E from the positron-r extension to the RStudio-keymap extension.

  • Create new ones in positron-r that don't conflict with VS Code. These will be useful for those of us that primarily use VS Code shortcuts but still want a way to invoke R commands with the keyboard.

    Since there are many commands and thus many keybindings, we might want to use the same approach as the Cmd+K prefix key. For instance we could use Shift+Cmd+K as a prefix key, then we'd have Shift+Cmd+K E to check a package, Shift+Cmd+K B to build one, etc.

    (I see that Shift+Cmd+K is used by Quarto for preview though, so we might need a different prefix.)

I've filed this issue in the RC milestone but I would personally bump it to Public Beta.

@lionel-
Copy link
Contributor

lionel- commented Apr 19, 2024

@hadley mentions Cmd+R would be an obvious prefix. It doesn't seem to be used for anything important:

Screenshot 2024-04-19 at 15 33 03

@juliasilge
Copy link
Contributor

During our private beta Q&A session, there was some discussion of folks who want to use the R package development shortcuts but not opt in to the RStudio keymap FWIW.

@hadley
Copy link

hadley commented Apr 20, 2024

One reason Cmd + R isn't used for anything important is because it probably can't be remapped in the browser, since it's used for refresh.

@lionel-
Copy link
Contributor

lionel- commented May 31, 2024

I'm experimenting with this keymap. The Cmd+' prefix is available and easy to type on qwerty. Feels good so far!

Screenshot 2024-05-31 at 09 45 03

Is there any reasons we'd not be able to use this prefix?

Edit: We might want to namespace dev keybindings further in Cmd+' Cmd+D. This way we can add a bunch of other usethis based commands within that namespace while keeping the main prefix available for other positron gestures. For instance I'd love:

@lionel- lionel- changed the title Overlap between R shortcuts and positron shortcuts Overlap between R shortcuts / keybindings and positron ones Jun 28, 2024
@juliasilge
Copy link
Contributor

We have collected a number of issues that are related to this problem where the UI always shows a built-in keybinding, even when that keybinding does not apply to that action. The user might end up looking at the UI and trying that keybinding, but it does something completely different. Let's use #2150 to track this problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working lang: r
Projects
None yet
Development

No branches or pull requests

4 participants