title: Override Chrome keyboard shortcuts in a user script
body: <p>I wrote a <a href="https://github.com/ThiefMaster/so-jsbeautifier/blob/master/StackOverflow_JS_Beautifier.user.js">user script</a> that performs a certain operation on selected text in a textarea when pressing <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>B</kbd>.</p>
  
  <p>This is done by registering a <code>keypress</code> event for the textarea and then checking the pressed key. To prevent the browser from handling the key combination I'm using the <code>preventDefault()</code> method which works fine in Firefox (the <em>Library</em> window is not opened but my code is executed instead).</p>
  
  <p>However, in Chrome that key combination opens the bookmarks bar and the <code>keypress</code> event is not even triggered.</p>
  
  <p>I wonder if there's a way to create such a shortcut in Chrome. It needs to work with a userscript - a real extension is not an option since I'd prefer not to maintain two different "versions" for Firefox and Chrome.</p>