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

RStudio Keymap shortcuts are visible even with keymap disabled #3993

Open
jmcphers opened this issue Jul 12, 2024 · 4 comments
Open

RStudio Keymap shortcuts are visible even with keymap disabled #3993

jmcphers opened this issue Jul 12, 2024 · 4 comments
Assignees
Labels
area: core Issues related to Core category. bug Something isn't working support

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Jul 12, 2024

The RStudio Keymap shortcuts are visible all the time, even with the keymap disabled. They wind up in menus (see #3847), and are also visible in the key mappings dialog.

image

This happens because the RStudio Keymap extension registers its shortcuts declaratively, as part of the extension's package JSON.

"keybindings": [
{
"mac": "cmd+shift+n",
"win": "ctrl+shift+n",
"linux": "ctrl+shift+n",
"key": "ctrl+shift+n",
"when": "config.rstudio.keymap.enable",
"command": "r.createNewFile"
},

This is the established pattern for keymaps extensions in the ecosystem.

image

However, because the RStudio Keymap is a built-in extension, it is always installed and always activated. In order to prevent the keymap from also always being active, we guard each mapping with config.rstudio.keymap.enable, so it only engages when the "RStudio Keymap" setting is on.

image

This doesn't provide a clean experience; we need to prevent these keymappings from leaking when the keymap is disabled.

Options:

@lijiaqi-github

This comment has been minimized.

@juliasilge

This comment has been minimized.

@lijiaqi-github

This comment has been minimized.

@juliasilge

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to Core category. bug Something isn't working support
Projects
None yet
Development

No branches or pull requests

4 participants