How to add keyboard shortcuts to your Bubble App

Follow me:

Keyboard shortcuts have been a natural part of desktop applications since… well, forever. For web applications it’s really in the last few years that they’ve started to become commonplace enough for users to actually remember to use them. Not to be confused with your browsers built-in shortcut keys of course.

Bubble doesn’t at the time of writing have a built-in support for keyboard shortcuts, but you can get there with a plugin.

The Air Keyboard Shortcuts plugin from the team over at Zeroqode will do the job for you. It’s built on the lightweight Mousetrap Javascript library which adds about 5kb to the first page load.

Setting up the keyboard shortcuts

Install the plugin as usual from Bubble’s plugin store, and then go to the page where you want to use this. This plugin requires that you place an element on the page. You’ll find it under the same name as the plugin:

image 19

Place the element anywhere on the page – don’t worry, it won’t be visible to your users. You need to make sure that it’s not invisible on page load, so make sure you don’t place it inside of a hidden group inadvertently as it won’t work.

Open up the element settings to set up the keyboard shortcuts. Note that you’ll need one element per shortcut that you want to set up.

Available keys

The available keys that you can listen to are as follows:

Key typeAvailable keys
Modifier keysShift, ctrl, alt, or meta (use mod to cover both ctrl on PC and cmd on Mac)
Special keysBackspace, tab, enter, return, capslock, esc, escape, space, pageup, pagedown, end, home, left, up, right, down, ins, del, and plus
Regular keysReference their normal buttons, like: a, /, $, *, or =.

Combination vs sequence

You can set up the plugin to both listen to combinations of keys, or keys that are entered in sequence (no less than one second apart), and even combine the two.

  • To set up a combination use the + sign to combine the two keys: mod+enter
  • To set up a sequence use space to combine the two keys: mod enter
  • To use a both, use both signs: mod mod+enter

The allow globally setting

Allow globally means that the keyboard shortcut will trigger even if you are focused on a field where you may not want it to. For example, if you set up a keyboard shortcut for the enter key, you may not want it to run while you are editing multi-line text.

Conflict with browser shortcuts

If you set up a shortcut that is in conflict with already existing browser shortcuts, both will run in most cases. But note that the plugin doesn’t override the browser. Setting up a keyboard shortcut for cmd+q on a Mac is probably not going to give you the result you were hoping for.

Happy clicking!

Support the site and keep it free ❤️

I love tech startups and the Bubble community, and have made it my mission to try and create content that’s valuable, easy to follow and entertaining.

Creating content next to full-time consulting work is time-consuming; if you’d like to support it and keep the site free for everyone, please consider buying me a coffee or becoming a supporting member.

Buy Me A Coffee

Follow me:
Bubble.io books

Learn Bubble the right way

Our professional Bubble books teach you how to plan, structure and build your applications right from the start.

5-star review stars

More Posts

Leave A Reply

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


Email icon

Useful articles and tips

Join the mailing list to get guides, opinions and articles on Bubble, no-code, automation and the tech industry.

We don't share your email address with anyone, and you can unsubscribe at any time.

You have successfully subscribed