Keyboard shortcuts stopped working as soon as clicking on a custom component(even the default one)

The shortcuts are great. But as soon as I click on a custom component, the shortcuts stopped working. How to fix that? I tested it on the default custom component. The behavior is the same.

I tried bluring it or dispatch the event from the custom component. Nothing works.

Hey @Peifeng_Zhang!

It doesn't look like this is supported at the moment but I have surfaced it with the dev team to look into.

In the meantime, you might try configuring custom event handlers in the component itself using Retool.triggerQuery to trigger a JS query in your app that can act as the handler.

      const handleKeyPress = (e) => {
        console.log("key pressed")
        if(e.key === "e"){
          console.log("shortcut pressed!")
      addEventListener("keypress", handleKeyPress);

What events are you looking to trigger via your shortcuts?

It worked! using triggerQuery. I just need to speed up user operation, to zoom, move the images