commands API doen’t cut it, then you have two options:
- Install listeners on all web pages
- Use native messaging
The disadvantage of the first approach is that is quite messy and will only ever work while the user has a web page (i.e. not the browsers UI or
about: pages, etc.).
The disadvantage of the second approach is, that the user needs to install a native application (which is messy) and that your key listeners are OS specific and most likely OS global. On the plus side, you can use virtually every key combination (even ones that would totally hinder normal workflows).
It shouldn’t be to hard to find examples for and implement the first approach.
I started an implementation of the native messaging approach here:
It is totally WIP, only works on Windows and is mostly undocumented. Especially, there is not even usage documentation yet. What it currently does is install
Shift + (
D) listeners to control playback on Spotifys inline player.
It requires NativeExt to be installed and set up (but that is documented).
If you have any further questions, feel free to ask!