Prevent default keyboard shortcut?

Can we prevent default browser keyboard shortcuts, like https://stackoverflow.com/questions/24764626/any-way-to-prevent-disable-ctrl-key-shortcuts-in-the-browser/24764878

By using the ‘key down’ dynamic event?

When should the ctrl be disabled exactly? And what are you actually trying to achieve?

My use case:
I want to set up a keyboard shortcut like CTRL+E to open an app wide ‘launcher’/search box. (Inspiration from https://university.webflow.com/lesson/quick-find - In webflow I use it a lot to quickly create a div, or search for elements. I want a similar feature)

So in this case I’d like a way to prevent the default browser shortcut that is triggered with CTRL+E. In my chrome browser it focusses the omnibox and lets me search Google.

Edit: you asked “when” → for us any page past the login, so right now the shortcut is on the layout pages attached to the

Use the keypress dynamic event - [Control][KeyE] and add Prevent modifier to prevent the default action in the browser:

Screenshot 2021-04-21 at 11.52.08

3 Likes

Oh wow missed those modifiers… Works flawlessly! Thanks!

Where can I read more about what the other modifiers do like Capture Once Self image ?

1 Like