Hotkey: toggle checkbox presence

Hi, I hope I didn't miss this FR somewhere.

Feature
I would like to ask if it would be possible to add a hotkey to toggle between the following on the current line

  • [ ] I am an entry with a checkbox
  • I am an entry without a checkbox

Why
In my personal workflow I often create a list of things to do with checkboxes, and sometimes I want to have a sublist under a checkbox item without checkboxes, such as

  • [ ] Do A
    • Some info about A
    • More info about A
  • [ ] Do B

Unfortunately when I hit Enter Joplin automatically creates a checkbox entry. I understand this is the most convenient behaviour in most cases, however it would be nice to be able to switch to uncheckboxed entry easily.

Thank you!

1 Like

Hello and welcome,

If you're on windows, here's a shortcut for that
Ctrl + Shift + 9 = Check box

More of similar ones are here:

I see, thank you. Unfortunately I am using Linux version of the app and it doesn't appear to have these shortcuts.

The post you linked suggests that Joplin has OS-dependent editors or shortcuts differ if TinyMCE is used under Linux. I am not quite sure how to check this other than reading the code right now.

Caveat to this is that this only applies in the richtext editor, the options in the markdown editor just straight up create the tags from scratch.
It doesn't appear that 'converting' a list item from one type to another is possible i.e. highlighting a selection and hitting the unordered list button will add and remove the - but highlighting it and pressing the ordered list will create 1. -

Which editor you are using is toggled by the button on the top right of the toolbar, it swaps you between richtext/WYSIWYG mode and markdown mode.

image

1 Like

I'd really like a toggle checkbox shortcut also. I thought I had posted about it somewhere before. There's a "toggle comment" shortcut, of Ctrl / and so it'd be similar behaviour to that to just add the - [ ] at the start of a line, or remove it.

A bonus would be a second shortcut, to toggle marking a checkbox complete, so between - [ ] and - [x].

When I did google around to see if there were other threads here on this, in one of them someone suggests that "there's already a button to click." However, many might empathise that heavy keyboard users, including developers, try to do as much as possible with just the keyboard, without breaking context to use a mouse. After all, <!-- comment --> has a toggle :slight_smile:

1 Like

This is a feature of the "Rich Markdown" plugin. To be honest, it's my main use for that plugin.

1 Like

Oh yes true, I do use that there. Can you add to the plugin to toggle the - [ ] in the first place? :smiley:

1 Like

Hi! Is there any update on this?
I'm currently trying to switch from OneNote, and I got used to it's Ctrl + 1 shortcut for ticking / unticking the checkbox. Would be great to have such feature as a keyboard shortcut :slightly_smiling_face:

Can be via Perform action (Ctrl+Enter by default) with Rich Markdown plugin

1 Like

It works, but only in Markdown mode. Wish it also worked in Rich Text mode

1 Like

I wrote a Keyboard Maestro script today (consider this v0.1) that is working well - it will create a checkbox if one does not exist on the line, or if one does exist, check/uncheck it via text. Cursor has to be on the same line as the checkbox (since I don't think there's a reliable way to go to beginning of paragraph based on cursor position - so this works a bit differently than OneNote).

The macro selects the line and copies to clipboard (after caching the current clipboard) to check if checkbox is present. Afterward it restores the clipboard.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Actions</key>
	<array>
		<dict>
			<key>ActionUID</key>
			<integer>33861</integer>
			<key>MacroActionType</key>
			<string>SetVariableToText</string>
			<key>Text</key>
			<string>%SystemClipboard%</string>
			<key>Variable</key>
			<string>StoredClipboard</string>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33914</integer>
			<key>JustDisplay</key>
			<false/>
			<key>MacroActionType</key>
			<string>SetClipboardToText</string>
			<key>Text</key>
			<string></string>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33789</integer>
			<key>KeyCode</key>
			<integer>123</integer>
			<key>MacroActionType</key>
			<string>SimulateKeystroke</string>
			<key>Modifiers</key>
			<integer>196864</integer>
			<key>ReleaseAll</key>
			<false/>
			<key>TargetApplication</key>
			<dict/>
			<key>TargetingType</key>
			<string>Front</string>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33797</integer>
			<key>KeyCode</key>
			<integer>123</integer>
			<key>MacroActionType</key>
			<string>SimulateKeystroke</string>
			<key>Modifiers</key>
			<integer>197376</integer>
			<key>ReleaseAll</key>
			<false/>
			<key>TargetApplication</key>
			<dict/>
			<key>TargetingType</key>
			<string>Front</string>
		</dict>
		<dict>
			<key>Action</key>
			<string>Copy</string>
			<key>ActionUID</key>
			<integer>33898</integer>
			<key>IsActive</key>
			<false/>
			<key>IsDisclosed</key>
			<false/>
			<key>MacroActionType</key>
			<string>CutCopyPaste</string>
			<key>TimeOutAbortsMacro</key>
			<true/>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33909</integer>
			<key>KeyCode</key>
			<integer>8</integer>
			<key>MacroActionType</key>
			<string>SimulateKeystroke</string>
			<key>Modifiers</key>
			<integer>256</integer>
			<key>ReleaseAll</key>
			<false/>
			<key>TargetApplication</key>
			<dict/>
			<key>TargetingType</key>
			<string>Front</string>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33901</integer>
			<key>MacroActionType</key>
			<string>CopyClipboard</string>
			<key>TargetNamedClipboardRedundantDisplayName</key>
			<string>JoplinTest</string>
			<key>TargetNamedClipboardUID</key>
			<string>BC43AF8B-41FB-47CF-A361-3E137A0BF7A8</string>
			<key>TargetUseNamedClipboard</key>
			<true/>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33810</integer>
			<key>Conditions</key>
			<dict>
				<key>ConditionList</key>
				<array>
					<dict>
						<key>ConditionType</key>
						<string>Text</string>
						<key>Text</key>
						<string>%NamedClipboard%JoplinTest%</string>
						<key>TextConditionType</key>
						<string>StartsWith</string>
						<key>TextValue</key>
						<string>- [ ]</string>
					</dict>
				</array>
				<key>ConditionListMatch</key>
				<string>All</string>
			</dict>
			<key>ElseActions</key>
			<array/>
			<key>MacroActionType</key>
			<string>IfThenElse</string>
			<key>ThenActions</key>
			<array>
				<dict>
					<key>ActionUID</key>
					<integer>33813</integer>
					<key>KeyCode</key>
					<integer>123</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196864</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33814</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33819</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33822</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33837</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>197120</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33827</integer>
					<key>KeyCode</key>
					<integer>7</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>0</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33862</integer>
					<key>JustDisplay</key>
					<false/>
					<key>MacroActionType</key>
					<string>SetClipboardToText</string>
					<key>Text</key>
					<string>%Variable%StoredClipboard%</string>
				</dict>
				<dict>
					<key>Action</key>
					<string>CancelThisMacro</string>
					<key>ActionUID</key>
					<integer>33844</integer>
					<key>MacroActionType</key>
					<string>Cancel</string>
				</dict>
			</array>
			<key>TimeOutAbortsMacro</key>
			<true/>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33849</integer>
			<key>Conditions</key>
			<dict>
				<key>ConditionList</key>
				<array>
					<dict>
						<key>ConditionType</key>
						<string>Text</string>
						<key>Text</key>
						<string>%NamedClipboard%JoplinTest%</string>
						<key>TextConditionType</key>
						<string>StartsWith</string>
						<key>TextValue</key>
						<string>- [x]</string>
					</dict>
				</array>
				<key>ConditionListMatch</key>
				<string>All</string>
			</dict>
			<key>ElseActions</key>
			<array/>
			<key>MacroActionType</key>
			<string>IfThenElse</string>
			<key>ThenActions</key>
			<array>
				<dict>
					<key>ActionUID</key>
					<integer>33850</integer>
					<key>KeyCode</key>
					<integer>123</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196864</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33851</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33852</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33853</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>196608</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33854</integer>
					<key>KeyCode</key>
					<integer>124</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>197120</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33855</integer>
					<key>KeyCode</key>
					<integer>49</integer>
					<key>MacroActionType</key>
					<string>SimulateKeystroke</string>
					<key>Modifiers</key>
					<integer>0</integer>
					<key>ReleaseAll</key>
					<false/>
					<key>TargetApplication</key>
					<dict/>
					<key>TargetingType</key>
					<string>Front</string>
				</dict>
				<dict>
					<key>ActionUID</key>
					<integer>33863</integer>
					<key>JustDisplay</key>
					<false/>
					<key>MacroActionType</key>
					<string>SetClipboardToText</string>
					<key>Text</key>
					<string>%Variable%StoredClipboard%</string>
				</dict>
				<dict>
					<key>Action</key>
					<string>CancelThisMacro</string>
					<key>ActionUID</key>
					<integer>33856</integer>
					<key>MacroActionType</key>
					<string>Cancel</string>
				</dict>
			</array>
			<key>TimeOutAbortsMacro</key>
			<true/>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33832</integer>
			<key>KeyCode</key>
			<integer>123</integer>
			<key>MacroActionType</key>
			<string>SimulateKeystroke</string>
			<key>Modifiers</key>
			<integer>196864</integer>
			<key>ReleaseAll</key>
			<false/>
			<key>TargetApplication</key>
			<dict/>
			<key>TargetingType</key>
			<string>Front</string>
		</dict>
		<dict>
			<key>Action</key>
			<string>ByTyping</string>
			<key>ActionUID</key>
			<integer>33791</integer>
			<key>MacroActionType</key>
			<string>InsertText</string>
			<key>TargetApplication</key>
			<dict/>
			<key>TargetingType</key>
			<string>Front</string>
			<key>Text</key>
			<string>- [ ] </string>
		</dict>
		<dict>
			<key>ActionUID</key>
			<integer>33864</integer>
			<key>JustDisplay</key>
			<false/>
			<key>MacroActionType</key>
			<string>SetClipboardToText</string>
			<key>Text</key>
			<string>%Variable%StoredClipboard%</string>
		</dict>
	</array>
	<key>CreationDate</key>
	<real>726181647.46813905</real>
	<key>ModificationDate</key>
	<real>726182856.98468006</real>
	<key>Name</key>
	<string>Make Checkbox</string>
	<key>Triggers</key>
	<array>
		<dict>
			<key>FireType</key>
			<string>Pressed</string>
			<key>KeyCode</key>
			<integer>18</integer>
			<key>MacroTriggerType</key>
			<string>HotKey</string>
			<key>Modifiers</key>
			<integer>256</integer>
		</dict>
	</array>
	<key>UID</key>
	<string>2E2CB7D0-C316-4F23-A08D-33FAB44F96A8</string>
</dict>
</plist>