In Firefox, how can I prevent pages from overriding Firefox built-in keyboard shortcuts through Javascript on a per-key basis? Preferably on a per-site basis, too? The most frustrating override is the forward slash ('/') that's linked to "Find in page". Sites like Google search results, Twitter timelines, some wikis, and other pages steal the slash key for their own search boxes, which is completely wrong.
Since my rep lets me ask, edit, and answer questions, but not add comments, this is basically a duplicate of these other two questions that weren't properly answered:
How do a stop a website for overriding my keyboard short cuts
Best Answer
Building on edymtt's answer, I've created a userscript which disables only specific keyboard shortcuts. You can add more shortcuts to disable by adding keycodes to the keycodes array, or restrict which sites to apply it to by replacing the
@include
tag with one or more patterns.Install using greasemonkey.