Q:

Possible to register key bindings from within Chrome extension's background JS?

I have a Chrome extension for custom keyboard shortcuts which currently registers the shortcuts using a content script. Is it possible to instead register these in a background JS file called from background.html? In my tests, it seems like bindings registered there are ignored because they go straight to the page.
If it matters, I'm using https://github.com/madrobby/keymaster to create/listen for the key bindings. For example, using something like:
key('a', function(){ alert('you pressed a!') });

...in my background.js file is ignored, but it works fine if used in a content script. Is there any way to listen for key presses in my background.js?

A:

No, you cannot... 
As you might already know, background page runs in a different page (even a different process). And the javascript based handlers work on the page they are put in.. What you said will be possible only if Chrome exposes some API.. 
But, You may want to check chrome's keybinding feature (experimental) at http://code.google.com/chrome/extensions/experimental.keybinding.html, though it restricts to a specific subset of keybindings only
As mentioned by Rob W, keybindings by design works only on pages, where content script can be inserted, which more or less boils down to http, https & file protocols (I'm not sure of file protocol though) with the exception of Chrome's Webstore

