Bookstack: Keyboard shortcuts (Not inside the editor)

Created on 12 Jan 2019  路  6Comments  路  Source: BookStackApp/BookStack

Describe the feature you'd like
I know there are shortcuts available inside the editor, but I'd love to see more added outside of the text editor. For example

  • "E" to edit a page, chapter, book, (depending which screen you're on)
  • "N" to create a new page
  • "C" to create a new chapter
  • "M to move
  • SHIFT + DEL to delete
  • etc

Describe the benefits this feature would bring to BookStack users
This will greatly increase productivity.

Open to discussion Front-End Enhancement UX

Most helpful comment

Hi Dan,

Thanks for considering my request.

I can see how "P" would make sense, however I was hoping to have "N" as the default new X action.
For instance, in the "Shelves" screen, "N" would create a new shelf, while in the "Book" screen, it would create a new book. Now, I believe that "Pages" are the default go-to inside of a book, therefore it should have the default shortcut.

Hope this makes sense?

All 6 comments

Thanks for the suggestion @andreicocari.

Related to #1198.

Would be good to get a list of shortcuts to implement, then close off this issue once complete. Then, if any extras are needed in the future new issues can be opened.

I'll leave this open to receive shortcut suggestions and maintain a list in this comment. I've removed the delete shortcut, think I'd prefer not to have shortcuts for destructive operations, They should be fairly infrequent anyway.

I wonder if the new page shortcut should be P instead of N to follow convention better?


Proposed Shortcuts

  • "E" - Edit the current page/chapter/book/shelf
  • "N" - Create new page
  • "C" - Create a new chapter
  • "M" - Move
  • "F" - Focus on global search box (Find)

Hi Dan,

Thanks for considering my request.

I can see how "P" would make sense, however I was hoping to have "N" as the default new X action.
For instance, in the "Shelves" screen, "N" would create a new shelf, while in the "Book" screen, it would create a new book. Now, I believe that "Pages" are the default go-to inside of a book, therefore it should have the default shortcut.

Hope this makes sense?

They've been implementing Confluence at work.
Figured I'd share their Keyboard Shortcuts as Inspiration

Just adding an implementation note, Will need to consider accessibility:

https://www.w3.org/WAI/WCAG21/Understanding/character-key-shortcuts.html

Didn't notice this issue when I first posted my own, so I'll just include my suggestion here since it was closed as a potential duplicate.

BookStack is already going for the Bookshelf > Book > Chapter > Page aesthetic anyway, so for an end-user case, I think accesskey navigation would be nice. So that you can move between chapters, and pages under each chapter, using your arrow keys or similar.

@ssddanbrown pointed out to me that many users probably already use the arrow keys for navigation or similar anyway, so perhaps something like shift or control plus arrow keys instead of direct access would be better? I've seen sites use comma and period as a back and forward button, so that's also an option.

As a recent Confluence convert, I'm thrilled with BookStack but really miss the 'e'dit shortcut. While this feature request matures, here's a stopgap to get the 'e'dit shortcut today.

Settings -> Custom HTML Head Content

<script src="//cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.5/mousetrap.min.js"></script>
<script>
  Mousetrap.bind('e', function(e) {
    if (window.location.href.includes('/page/') && !window.location.href.endsWith('/edit')) {
      window.location.href=window.location.href+'/edit';
    }
  });
</script>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wookbert picture Wookbert  路  3Comments

Zeigren picture Zeigren  路  3Comments

ensemblebd picture ensemblebd  路  3Comments

Valiantiam picture Valiantiam  路  3Comments

Legoracers picture Legoracers  路  3Comments