Block Editor: Cmd+Shift+Plus to Toggle Block Inserter

Block Editor Cmdshiftplus To Toggle Block Inserter Image

Why limit yourself to default keyboard shortcuts in the Block Editor when you could add extra ones that you’ll probably never remember? (but for me this one’s better 👟 )

What it does…

Allows Mac users to press Cmd+Shift+Plus and see the Block Inserter.

Why it does it…

There was a time when I found this really useful. Sometimes I’m doing a lot of repetitive work in the WordPress Block Editor, and will toggle this on. Yes, by default, WP offers Cmd+Alt+T or Cmd+Alt+Y for inserting before (T) or after (Y), but I like mine better. And the default is less comfy. But also mine doesn’t work sometimes. Still figuring that out.

How it does it…

When the Block Editor loads, this adds a javascript that listens for keydown, then triggers a click of the open/close Block Inserter button.

Use the JSON file for easily importing into your CodeSnippetsPro plugin. Use the PHP file or just copy/paste the code sample into your functions.php if you’re not using CodeSnippetsPro.

Related Snips

Leave a Reply

Your email address will not be published. Required fields are marked *