The problem is that I'll have multiple instances of the content
script, AFAIK.
My content script is loaded with this:
pageMod.PageMod({
include: "*",
contentScriptFile: data.url("myfile.js"),
onAttach: function( worker ) {}
...
AFAIK, that will generate multiple instances of the content script,
one for every tab.
OTOH, Hotkey is a global, in the sense that it isn't linked to a
specific content script or tab. Thus, when the Hotkey callback is
called, I won't know which of the possibly-multiple "worker" objects
should be called.
I might be wrong about that since I just want to know enough to write
my extension, but if I'm right then Hotkey would seem to need some way
to tell which tab the key was pressed in.
BTW: my extension uses the method in my first message, and in the
meantime it got experimentally approved. So, doing it that way might
be the approved way.