Shortcut for bullet points and numbered lists #1038

Closed
opened 2026-02-04 23:31:23 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @lmeerwood on GitHub (Feb 9, 2019).

Describe the feature you'd like
A shortcut key to add bullet points or numbered lists so they can be added without using the mouse to select it from the menu

Describe the benefits this feature would bring to BookStack users
This would increase the speed at which someone would be able to write notes when bullet lists or numbered lists are commonly used.

Additional context
I go between bullet points and paragraph writing a lot. Nearly every other formatting item can be done via a short cut key, but bullet lists and numbered lists both require using the mouse to activate them. Would it be possible to have shortcut keys added for them?

Originally created by @lmeerwood on GitHub (Feb 9, 2019). **Describe the feature you'd like** A shortcut key to add bullet points or numbered lists so they can be added without using the mouse to select it from the menu **Describe the benefits this feature would bring to BookStack users** This would increase the speed at which someone would be able to write notes when bullet lists or numbered lists are commonly used. **Additional context** I go between bullet points and paragraph writing a lot. Nearly every other formatting item can be done via a short cut key, but bullet lists and numbered lists both require using the mouse to activate them. Would it be possible to have shortcut keys added for them?
OVERLORD added the 🔨 Feature Request💻 Front-End labels 2026-02-04 23:31:23 +03:00
Author
Owner

@micw commented on GitHub (Nov 9, 2021):

An alternative to shortcut would be to register "star + whitespace + character" at beginning of a line and auto-convert it to a bullet. That's a common pattern available in many other editors. Once in "bullet mode", more/nested bullets can already be added using keyboard only.

@micw commented on GitHub (Nov 9, 2021): An alternative to shortcut would be to register "star + whitespace + character" at beginning of a line and auto-convert it to a bullet. That's a common pattern available in many other editors. Once in "bullet mode", more/nested bullets can already be added using keyboard only.
Author
Owner

@deanord commented on GitHub (Jan 10, 2022):

99% of the time, this is the only reason I have to reach for my mouse when working on a page. @micw suggestion would be spot on, and agree that this is how most editors work.

@deanord commented on GitHub (Jan 10, 2022): 99% of the time, this is the only reason I have to reach for my mouse when working on a page. @micw suggestion would be spot on, and agree that this is how most editors work.
Author
Owner

@ssddanbrown commented on GitHub (Jan 10, 2022):

If you're really desperate for such short-cuts within the WYSIWYG editor you can take advantage of the exposed editor hooks:

<script>
	window.addEventListener('editor-tinymce::setup', event => {
		const editor = event.detail.editor;
		editor.shortcuts.add('meta+o', '', 'InsertOrderedList');
		editor.shortcuts.add('meta+p', '', 'InsertUnorderedList');
	});
</script>

Add that into the "Custom HTML Head Content" setting and you should be able to trigger lists with Ctrl+O & Ctrl+P (Or Cmd key on Mac I think). Note, This will stop working in the future as we move to a new editor. Current editor changes are pretty much on pause while I'm working on the new editor but might sneak these shortcuts in to the new editor when aligning the current shortcuts, will need a better think about the keys to use.

I'm not overly keen on auto-convert upon star usage (Or text content patterns in general). I may just be too far damaged by word's similar auto-convert features but I want to avoid potentially confusing behaviour auto-convert where possible in the WYSIWYG editor since it's focused on a non-technial audience. It would also be a pain to implement since we'd need to offer control to those that don't desire it, and keyboard pattern detection (Or WYSIWYG actions) for reverting in scenarios it's undesired.

@ssddanbrown commented on GitHub (Jan 10, 2022): If you're really desperate for such short-cuts within the WYSIWYG editor you can take advantage of the exposed editor hooks: ```html <script> window.addEventListener('editor-tinymce::setup', event => { const editor = event.detail.editor; editor.shortcuts.add('meta+o', '', 'InsertOrderedList'); editor.shortcuts.add('meta+p', '', 'InsertUnorderedList'); }); </script> ``` Add that into the "Custom HTML Head Content" setting and you should be able to trigger lists with `Ctrl+O` & `Ctrl+P` (Or Cmd key on Mac I think). Note, This will stop working in the future as we move to a new editor. Current editor changes are pretty much on pause while I'm working on the new editor but might sneak these shortcuts in to the new editor when aligning the current shortcuts, will need a better think about the keys to use. I'm not overly keen on auto-convert upon star usage (Or text content patterns in general). I may just be too far damaged by word's similar auto-convert features but I want to avoid potentially confusing behaviour auto-convert where possible in the WYSIWYG editor since it's focused on a non-technial audience. It would also be a pain to implement since we'd need to offer control to those that don't desire it, and keyboard pattern detection (Or WYSIWYG actions) for reverting in scenarios it's undesired.
Author
Owner

@deanord commented on GitHub (Jan 10, 2022):

Thank you Dan, this works great!

@deanord commented on GitHub (Jan 10, 2022): Thank you Dan, this works great!
Author
Owner

@ssddanbrown commented on GitHub (Jul 27, 2022):

List shortcuts now added in #3599, To be part of the next feature release.

@ssddanbrown commented on GitHub (Jul 27, 2022): List shortcuts now added in #3599, To be part of the next feature release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1038