Add support for global media keys.
Currently only support Windows.
Special thanks to [Alexandre Poirot] (http://blog.techno-barje.fr/) for his great js-ctypes tutorials and the idea of using message-only window:
- http://blog.techno-barje.fr/post/2010/08/27/jsctypes-win32api-jetpack-jetintray/
- https://github.com/ochameau/jetintray
make xpi
For example, in extension code or [userChromeJS] (http://userchromejs.mozdev.org/) script:
- observe
mediakey
topic, and checkdata
:
- next
- previous
- stop
- play_pause
- communicate with content scripts
see examples/mk_test.uc.js
For example, in [Greasemonkey] (https://addons.mozilla.org/firefox/addon/greasemonkey/) script:
- enable "Simulate Key Events"
- listen to
keyup
event, and checkkeyCode
:
- 0xB0 / 176 (next)
- 0xB1 / 177 (previous)
- 0xB2 / 178 (stop)
- 0xB3 / 179 (play_pause)
see examples/mk_test.user.js
GNU General Public License v3.0