How to detect when Flash has keyboard focus?
I'm trying to build basic keyboard controls into a site that uses JW Player for video. I have jQuery using keypress() to detect the space bar and pass an instruction on to the player, which works well. When the user clicks the player, a JW Player plugin takes over and handles keypresses.
This system works in Firefox and Safari, but unfortunately in Chrome and IE, jQuery still processes the keyboard even when Flash has been given focus. Is there a way to detect when Flash has keyboard focus, so I can have jQuery avoid processing key presses in that case?