Hide Favorites Keyboard Shortcut?

I love the favorites plug-in. But often I want to hide it along with the other panels to have a clean window with the notes. Is there a way to assign a keyboard shortcut to toggle display of favorites. The only way I can toggle is through the menus,

Hi @bertradio,

  1. Go to the menu: Help > Open Profile Directory
  2. Copy the file keymap-desktop.json to a second location in case things get messed up
  3. Open keymap-desktop.json in a text editor and add the following (substituting what key combination you'd prefer):
  {
    "command": "favsToggleVisibility",
    "accelerator": "Ctrl+8"
  },
  1. Now restart Joplin and your new keyboard shortcut should be active

The file will be very fussy, so if you're not familiar with json, paste the code in between two existing shortcuts and check that the brackets, commas, colons, mimic the surrounding shortcuts.

Good luck!

1 Like

For some reason Open Profile Directory did not open anything. But I did find keymap-desktop.json and added the code. I assigned it to F9. So hitting F9, F10 and then F11 clears everything but the note pane and does exactly what I want.

Is there a list somewhere of additional commands that can assiend in keymap-desktop.json?

Thanks for the help.

Don't know of any list, but one way to check is: If a panel can be toggled by means of the menu, then use Ctrl+P to find the internal command name. After that you can try adding a shortcut key to keymap-desktop.json as described above, and restarting to see if took.

1 Like

Thanks. That's very helpful.

I just tried to add a shortcut for toggleEditors but no matter what key I assign, nothing happens. It does work when selected from the Command Palette. And it did show up in Options. May be a bug.

I don't believe it will work in every case, depends on how things are coded internally, I suppose, whether a shortcut is available. If a shortcut is possible, it's usually exposed through Tools > Options > Keyboard. The keyboard settings generally do a great job of managing keyboard shortcuts. If no shortcut is exposed, the hack above is worth a try and will work in some instances.

It was exposed in Tools > Options > Keyboard and I could set various shortcut keys there. But none of them did anything. No big problem. I was just trying to save myself some mouse clicks.