# Some keyboard shortcuts not working after reload

**URL:** <https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260>\
**Category:** Core Development\
**Created:** [6 May 2022 00:20 UTC](https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260 "2022-05-06T00:20:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hufftheweevil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hufftheweevil/32/47588_2.png) [@hufftheweevil](https://discourse.nodered.org/u/hufftheweevil)\
**Post date:** [6 May 2022 00:20 UTC](https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260/1 "2022-05-06T00:20:05Z")

</div>

I have the following keymap in my user file, as configured from the editor:

```auto
{
 "core:enable-flow": {
   "scope": "*",
   "key": "ctrl-shift-up"
 },
 "core:disable-selected-nodes": {
   "scope": "*",
   "key": "ctrl-down"
 },
 "core:disable-flow": {
   "scope": "*",
   "key": "ctrl-shift-down"
 },
 "core:enable-selected-nodes": {
   "scope": "*",
   "key": "ctrl-up"
 }
}

```

When I figured configured those keys in the editor, they all worked perfectly. But when I reload the editor, only the `ctrl-shift-` keys work. The `ctrl-` keys map back to the default of moving a node up or down in the workspace. If I go in and play around in the keyboard shortcuts editor and remove it, then add it again, it works again. But only until I reload the editor (i.e. refresh the page). It seems that when the editor loads in the browser, it is not correctly mounting/mapping those two shortcuts.

So it appears to be a bug. But if I'm doing something wrong, please let me know.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 May 2022 07:25 UTC](https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260/2 "2022-05-06T07:25:57Z")

</div>

Hi, could you please raise an issue here: [node-red/node-red/issues](https://github.com/node-red/node-red/issues) detailing this issue so that it gets tracked?

Thanks

---

<div class="post-metadata">

**Author:** ![hufftheweevil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hufftheweevil/32/47588_2.png) [@hufftheweevil](https://discourse.nodered.org/u/hufftheweevil)\
**Post date:** [6 May 2022 19:35 UTC](https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260/3 "2022-05-06T19:35:33Z")

</div>

Okay, issue raised.

> <https://github.com/node-red/node-red/issues/3598>
>
> \### Current Behavior
> 
> Custom key mappings for \`ctrl-up\` and \`ctrl-down\` do not w…ork after reloading the editor. Instead, they map to the default usage of moving a node up and down on the editor workspace.
> 
> \### Expected Behavior
> 
> After reloading the editor in the browser, my custom key mappings for \`ctrl-up\` and \`ctrl-down\` should work as I specified in the keyboard shortcut editor.
> 
> \### Steps To Reproduce
> 
> 1. Set up the following keyboard shortcuts using the user settings file or in the editor UI:
> \`\`\`
> {
> "core:enable-flow": {
> "scope": "\*",
> "key": "ctrl-shift-up"
> },
> "core:disable-selected-nodes": {
> "scope": "\*",
> "key": "ctrl-down"
> },
> "core:disable-flow": {
> "scope": "\*",
> "key": "ctrl-shift-down"
> },
> "core:enable-selected-nodes": {
> "scope": "\*",
> "key": "ctrl-up"
> }
> }
> \`\`\`
> 
> 2. Reload the editor
> 
> 3. Attempt to use the \`ctrl-up\` and \`ctrl-down\` keyboard shortcuts to enable/disable the selected node, per the custom mapping above.
> 
> (Note: This example also shows custom keyboard shortcuts for \`ctrl-shift-up\` and \`ctrl-shift-down\`, which do \*\*not\*\* have the issue reported here. This is done to help understand where the issue might be.)
> 
> \### Example flow
> 
> N/A
> 
> \### Environment
> 
> \- Node-RED version: 2.2.2
> \- Node.js version: 16.13.1
> \- npm version: 8.1.2
> \- Platform/OS: Windows + Raspbian Pi OS (tried on both OSs, all other versions the same)
> \- Browser: Chrome 101

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 July 2022 19:35 UTC](https://discourse.nodered.org/t/some-keyboard-shortcuts-not-working-after-reload/62260/4 "2022-07-05T19:35:57Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
