webextensions-examples
webextensions-examples copied to clipboard
How to listen keypress in devtools panel
I created an add-on as a panel in browser's developer tools. I want to create a shortcut to execute a function in my application, but I don't find any example about it. I try to follow this link: https://stackoverflow.com/questions/16089421/simplest-way-to-detect-keypresses-in-javascript but not working. My add-on https://github.com/noobfromvn/hackbar
I'm not sure if this is exactly what you want, but have you tried listening for your shortcut in the background script using the commands
API then sending a message to your panel using runtime.sendMessage?
No activity within the last three years, closing.