Open a Popup on Key Press

Hey there, checking in to see if anybody figured out a way to run a workflow when a key was pressed. For context, what I’m looking to do is this:

  • User wants to create a new Goal
  • User presses “g” on their keyboard when an input field is not active
  • The “Add Goal” popup appears

Any ideas?

Here is an article from the Bubble blog that some one hacked a way to show a pop up.

Hope this help.

1 Like

Awesome! Thanks. Boy it sure is hacky, but it’ll work.

Just wanted to say it works like a charm. Exactly what I needed. Thanks @lester

That’s great. I just read the blog but I never tried it myself.

Hey @andrewgassen,
Here is a “less hacky” way using a plugin.

In fact the plugin was inspired by your post.
Try it and let me see how it goes.

I just saw the plugin, and it is a great one one, and tried it out then i was going to post it here but I am running into errors with it. I cannot get it to work on Chrome or Safari.

Fantastic. I actually had to turn off the implementation I had before, because the flow control was just way too hard for a complex app. When I get back from dinner, I’m gonna install this plugin and give it a whirl. Thanks @seanhoots

Hey @lester,
Do you mind sharing your editor privately with me to take a look.
I’ve tested on both Firefox, Chrome , IE and Edge it works perfectly for me.

Also generally you shouldn’t use use two character keys in a shortcut combination.
If you do the shortcut will be triggered by only the last key.
You can do it with the sequence though or use the character key in combination with one of the modify keys, like shift, command, alt, etc.
But even in this case you shouldn’t be getting any error.

This topic was automatically closed after 70 days. New replies are no longer allowed.