4

Sort of like preventing websites from disabling your ability to right click. Some websites hijack the up and down arrows on the keyboard and give them a different function than what they normally do (scroll the page).

If there's a way to disable this, please let me know.

fixer1234
  • 28,064
James Watt
  • 1,823

3 Answers3

2

Firefox current version enables us to "disable javascript to hijack context menu":

Tools/Options/Content/Enable Javascript Advanced/Disable or replace context menus

But there is no feature to "disable javascript to hijack keyboard shortcuts".

ps. I hate twitter website, its keyboard shortcuts conflict with my system-based keyboard shortcuts: J, K, L, I

I've made feature request on bugzilla.mozilla.org, please comment there: https://bugzilla.mozilla.org/show_bug.cgi?id=775002

diyism
  • 205
1

To really stop this behavior without breaking other JavaScript (i.e. removing keybinds but preserving other page functionality), you need to break the specific JavaScript calls that affect keybinds (and only them). The easiest way to do this is with GreaseMonkey and a pre-made script like this one: Disable website keyboard hooks.

Greenonline
  • 2,390
flubby
  • 11
0

Can you give an example of such page (would be easier to test)?

There are various anti-disablers available as Greasemonkey userscripts, like this, so probably it would be easy to create similar one, presumably by adding something like doc.onkeypress = null; or more elaborate, depending on your needs.

jakub.g
  • 4,904