Keyboard shortcut - how to add via keymap-desktop.json?

I'm using the note tabs plugin and wanted to add a keyboard shortcut to close a tab. Here's how I tried to do that - please let me know if you can see where I erred:

  • go to Tools > Options > Keyboard Shortcuts, then export to create the keymap-desktop.json file in the joplin-desktop directory (Windows 10).
  • edit the file to add a shortcut to close a tab. So the file looks like this:
[
  {
    "command": "tabsPinToTabs",
    "accelerator": null
  },
  {
    "command": "tabsPinNote",
    "accelerator": null
  }
  {
    "command": "tabsClear",
    "accelerator": "Ctrl+W"
  }
]
  • In the Keyboard Shortcuts section in Options, import this file.
  • receive error: Unexpected token { in JSON at position 131

I think you are missing a comma between these two blocks here:

instead it would be

[
  {
    "command": "tabsPinToTabs",
    "accelerator": null
  },
  {
    "command": "tabsPinNote",
    "accelerator": null
  },
  {
    "command": "tabsClear",
    "accelerator": "Ctrl+W"
  }
]
2 Likes

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