Skip to content

RStudio Keymap shortcuts are visible even with keymap disabled #3993

Closed
@jmcphers

Description

@jmcphers

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:

Metadata

Metadata

Assignees

Labels

area: coreIssues related to Core category.bugSomething isn't workingsupport

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions