JavaScript detecting play/pause keyboard (virtual) key
问题 By accident, I just pressed the play/pause ( ▶/❚❚ ) button on my keyboard (the button just above Num Lock on , while playing a YouTube video in a tab that was not focused. To my massive surprise, the YouTube video paused immediately. Now, I tried looking up how this works, but I was not able to find anything on the internet explaining how a keypress can be detected for keys like this. I tried running onkeydown = function(e) {console.log(e)} in my console, but pressing the play/pause button