webextensions-examples icon indicating copy to clipboard operation
webextensions-examples copied to clipboard

How to listen keypress in devtools panel

Open noobfromvn opened this issue 7 years ago • 1 comments

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

noobfromvn avatar Nov 30 '17 04:11 noobfromvn

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?

wbamberg avatar Dec 05 '17 01:12 wbamberg

No activity within the last three years, closing.

rebloor avatar Jul 31 '23 00:07 rebloor