I'd like to stop webpages from binding to ⌥ (Option) only shortcuts.
E.g. these can be bound to:
- ⌘+V
- ⌘+⌥+K
- ⌘+⇧+E
- ⌘+⌥+⇧+X
- etc.
But these I want to prevent being bound to (so that their default comes into effect, I have set them up as dead keys/special character keys on my keyboard to type symbols I find important):
- ⌥+/
- ⌥+⇧+E
- etc.
Best Answer
I lightly edited some code from this answer on Super User to make it prevent the capture of certain shortcuts which do use the Option key and do not use the Command key. You'll want to add the keycodes for any shortcuts you want to prevent binding to the keycodes list. I started it with the codes for the two examples in your question,
/
andE
(it doesn't care if other modifiers are pressed or not).You can install this to your browser using an extension such as Tampermonkey.