dmauro / Keypress

A keyboard input capturing utility in which any key can be a modifier key.
http://dmauro.github.io/Keypress/
Apache License 2.0
3.18k stars 313 forks source link

Media keys support #122

Closed devkhan closed 8 years ago

devkhan commented 8 years ago

Is it possible to capture media keys e.g. play/pause, next, etc.?

I guess they might be platform specific, but does browsers forward these keys' presses to the webpage?

beauwest commented 8 years ago

Unfortunately media keys do not provide events to the browser. You can test it here: http://www.asquare.net/javascript/tests/KeyCode.html

devkhan commented 8 years ago

Nevermind, I've solved my problem with this: https://chrome.google.com/webstore/detail/streamkeys/ekpipjofdicppbepocohdlgenahaneen

I don't know how it does it, but I guess if this can do it, then maybe there is some way to catch media keys inside the browser (or maybe it's just possible in an extension). Maybe.