How do I programatically trigger shortcut keys in Chrome with an Extension? (NPAPI or JavaScript Extensions) How do I programatically trigger shortcut keys in Chrome with an Extension? (NPAPI or JavaScript Extensions) google-chrome google-chrome

How do I programatically trigger shortcut keys in Chrome with an Extension? (NPAPI or JavaScript Extensions)


It would be awesome, but unfortunately it is not possible with javascript.


An NPAPI plugin will not do what you want; NPAPI plugins don't deal with anything that is of the browser itself, only with the webpage they are placed in. They also can't be automatically loaded.

The best you could do with a NPAPI plugin would be to put it in a Chrome Extension and use it as part of something else; if Chrome Extensions don't natively allow you to capture hotkeys like that it might be possible to use C++ code and some sort of hook to catch the hotkey and pass it on to the browser as a , but it would be a very system specific and completely unsupported hack that you'd have to figure out for each OS that you want to support; there are no NPAPI browser APIs for this sort of thing.

For more information, see http://npapi.com/extensions