Shortcut for check list in markdown mode

Operating system

macOS

Joplin version

2.13.2

Desktop version info

Joplin 2.13.12 (prod, darwin)
Revision: e027cdc
Note Tabs: 1.4.0
Simple Backup: 1.3.5

Sync target

Dropbox

Editor

Markdown Editor

What issue do you have?

Is it possible to map a shortcut in markdown mode for creating a to do list (check box)?

I know there is a shortcut for creating a bullet list (Option + Cmd + L). I also know it is possible to add new shortcuts directly in keymap-desktop.json

What would be the correct line to add in keymap-desktop.json for a to-do list (Option+Cmd+C in my example below)?

{
"command": "XXX",
"accelerator": "Option+Cmd+C"
},

And, while we are at it, what would the corresponding command for a numbered list be?

Yes, I know there are shortcuts for numbered lists, bullet lists and check lists in the Rich Text editor but I try to write in the markdown mode where those shortcuts don't work.

Thanks for your help!

Kind regards
// Pär

1 Like

The bit that goes into the command section is the "proper" name of the usual commands accessible via the command palette (ctrl/cmd + shift + p) which you can search in and it will display both its "proper" name and the more friendly one.

For the numbered list you should be able to use the textNumberedList command and for checkboxes it would be textCheckbox.

Tried to add the following but it didn't work:

[
  {
    "command": "CreateBackup",
    "accelerator": null
  },
  {
    "command": "tabsPinNote",
    "accelerator": "Option+Cmd+W"
  },
  {
	"command": "textCheckbox",
	"accelerator": "Option+Cmd+."
  },
  {
	"command": "textNumberedList",
	"accelerator": "Option+Cmd+,"
  },
]

FYI:

  • I went to help > show profile folder
  • I edited the json file according to above and saved the file
  • I reopened Joplin

After adding the code above I cannot see the commands in the keyboard dialogue box or the command palette that @Daeraxa mentioned.

1 Like

The palette is independent to the keybindings, that allows you to use the commands directly and I don't think any changes to the file show in the UI anyway.

Did you completely shut down Joplin? I.e. it wasn't just minimised to the system tray (or whatever the macOS equivalent is?).

Update: problem solved
Solution: I had to import the json file.

It wasn't enough to save the file in my text editor. As the json file is in a hidden config folder (subfolder to the user folder on a mac) I saved it temporarily on my desktop and imported it.

Comments:

  • Do remember to remove the last "," after the last command
  • I replaced my keyboard shortcut of choice with just "null" to enter the keyboard in the Joplin user interface instead. Then I could easily verify if the shortcut I had in mind was occupied or not.

So, the code I used was:

[
   {
	"command": "textCheckbox",
	"accelerator": null
  },
  {
	"command": "textNumberedList",
	"accelerator": null
  }
]

Thanks for your help.

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