I wrote a user script that performs a specific operation on the selected text in the text field when I press CTRL+ SHIFT+ B.
This is done by registering the event keypressfor the text field, and then checking the pressed key. To prevent the browser from processing the key combination, I use a method preventDefault()that works fine in Firefox (the library window does not open, but my code runs instead).
However, in Chrome, this keyboard shortcut opens the bookmarks bar, and the event keypressdoes not even fire.
I wonder if there is a way to create such a shortcut in Chrome. It should work with usercript - the real extension is not an option, since I would prefer not to support two different "versions" for Firefox and Chrome.
source
share