Add-on: Send a key combination to the Browser

Is there a way of my addon to send a key combination to the Browser?
I’m creating an automation add-on and I need to send for example a key combination like: Ctrl+J or Ctrl+P. Is it possible?

Thank you.

For web content, you can use content scripts to dispatch synthetic keyboard events to web pages. However, synthetic events are easily identifiable and some sites may choose to ignore these events.

1 Like

And for print (Ctrl + P) you can call:


But other than that, you can’t send keys to the browser, only to the page where your content_script is running.

1 Like

Thank you… I had to implement a different solution to my automation project. As it was a garage project I developed a C# application to send the keystroke to the browser. Tks…

1 Like