Keyboard shortcut to move notebook of a selected note

Hi,

Apologies if this is a noobie question and it has been answered elsewhere. I've tried searching the forums but haven't come across an answer.

Is there a keyboard shortcut for moving notebook of a selected note? I don't seem to be able to find any, and I can't seem to find a command that I could assign a shortcut to either. If it is not there, I think it would be really useful to have it added in a future update as it can streamline the workflow and save a stack of time switching between keyboard and mouse (Specially when reviewing and sorting a batch of notes).

Thank you.

Kind regards
Kheeran

Hi, welcome to the forum

Just to clarify: you mean

  1. a shortcut for moving a (selected) note to another notebook?

  2. Or you'd like a shortcut to move a notebook (of a selected note) into a different notebook?

Although I understand it is not exactly what you're asking for, the first feature can be roughly achieved via the next plugin

The second one is not possible as the moment, that's true, although in theory, the appropriate plugin can be developed i.e. achieved via Joplin API. The question is only who'd want to do it.

Hi,

Thanks for the reply, it was 1. that I was referring to. Thanks for pointer to Quick Move Notes plugin, which is half way there. What I was hoping to find is a way to have a shortcut key assigned to this right-click menu item,

The feature is actually already there in Joplin, just doesn't seem to be a way (that I can see) to add a shortcut to it.

Kheeran

Although it isn't in the key binding options it does have a command associated with it so it can be bound.
If you open the command palette (ctrl + shift + p) and type "moveToFolder" you can see the command itself.

If you want to bind that to a shortcut you can actually add this to your keymap-desktop.json in your profile dir (help > open profile directory) like:

  {
    "command": "moveToFolder",
    "accelerator": "Ctrl+Alt+R"
  }

If the file doesn't already exist the easiest way is to go to Options > Keyboard shortcuts and add a shortcut against one that doesn't have something already, that will create the file so you can copy the pattern if you are unfamiliar with json.

Worth noting this only seems to work if the focus is in the editor itself, not on the note list.

1 Like

Hmm, this sounds like a bug to me.

The command itself doesn't care, just when bound to a shortcut. I can see if it does the same on other OSs.
Also I don't know if it is command specific or accelerator specific, would be worth finding out.

Ah... thanks, that solves it! Also learned a few things about how Joplin works under the hood.

Interesting that the key binding only works in the note editor window and not the notes list.

Thanks for the help.

Maybe we should open a gh issue to track this.

Opened here - Desktop: Command "moveToFolder" when bound to an accelerator only works when focus is on codemirror editor · Issue #6063 · laurent22/joplin · GitHub

3 Likes

Hi. I wanted to set a shortcut to move a note from one notebook to another, I found this topic in the forum and tried to implement the proposed solution, but it doesn't work for me. Any suggestions on how I can troubleshoot this? (I've tried changing the order of commands in keymap-desktop.json and other small things but nothing seems to work. Below is what I have in keymap-desktop.json (I created a shortcut for "toggleNotesSortOrderField" to get keymap-desktop.json to show up in the directory but I don't know where "CreateBackup" populated from, I didn't edit this in the Keyboard shortcuts.)

[
{
"command": "toggleNotesSortOrderField",
"accelerator": "Ctrl+Alt+Z"
},
{
"command": "moveToFolder",
"accelerator": "Ctrl+M"
},
{
"command": "CreateBackup",
"accelerator": null
}
]

Thank you!

Try switching editor modes and see if it works (it doesnt work on markdown viewer for me). Joplin should fix this

@restreachi Thank you for the reply! I almost solely use the rich text editor. I tried switching to markdown to see what happens in that mode, and, like you, the shortcuts I create (that work in rich text) don't work in markdown. I think the problem is one for a few of:
(1) my coding
(2) the specific choice of shortcut ("Ctrl+M"). I've tried others for "moveToFolder" and they don't work either, but I could (by coincidence) be trying a bunch that wouldn't work anyway.
(3) the "moveToFolder" command doesn't work
(4) it's not possible to enter shortcuts for commands that aren't listed in the shortcuts menu. This either isn't it or something has changed since it seems to have worked by kheerand earlier in this thread.
(5) or directly editing keymap-desktop.json does not work. I suspect this might it as I've tried entered the exact same text, as is generated through creating a shortcut in Joplin's settings, but through the file itself (copy/paste of the text). I entered a shortcut in the Joplin shortcuts (for "showNoteProperties"), tested it (it worked), went into keymap-desktop.json and copied the text, then I removed the shortcut in Joplin shortcuts, tested it (it no longer worked, as expected), then I opened the keymap-desktop.json and pasted the exact text that had been there when it worked, tested it in Joplin and it didn't work.

I have spent an embarrassing amount of time on this, especially since it (takes more steps but) can be done through the command palette - sometimes it's just hard to quit a problem once it's reared it's head. So for now, I am going to assume that the keymap-desktop.json cannot be directly edited to add shortcuts that aren't in the shortcuts menu in the settings.

1 Like

I tried to add a shortcut to move a note in a notebook but it did not work.

Specifically I added the shortcut to the JSON file.

Restarted Joplin multiple times.

I do see the new shortcut in the shortcut list in joplin.

When I try (and I used CTRL+M and then again tried CTRL+SHIFT+M) nothing happens in Joplin. I tried both having notes in markdown and Rich text.

Version:
Joplin 3.1.24 (prod, win32)
Revision: d581264

I'll keep using the CTRL+SHIFT+P to open the quick list and move from there.