*The gist:* **What's the best way to escape a Flash object's focus on a webpage?**

*Context:*
I have a hotkey listener (an AutoHotKey script) running in my tray. If the script detects the command `Alt+Shift+F6` while I am clicked into a Flash object on a webpage, it activates and sends key combinations to Flash to pull certain data logs. After this process completes, I want to call up a JavaScript file on that same browser tab that requests additional information from the user - basically, a tiny UI with additional text fields available in a third-party bug tracker. To do this, I want to send a `javascript:` command to the address bar using `Ctrl+L` and having AutoHotKey paste in the full call to the JS file.

*A visualization of a possible environment:*

![](https://i.imgur.com/tnJJ5UG.png)

*The problem:*
I need the user to be clicked INTO Flash in order to pull the data logs. However, I need the user to be clicked OUT of Flash for `Ctrl+L` to actually work - Flash appears to eat all keystrokes at the browser-level when one of its objects has focus.

*A possible solution:* The easiest way to go about this would be to simulate clicking on the stage, which borders my Flash object on every side. This should work, but I must assume the stupidest possible user. Such a user would somehow limit their current browser window to only be as big as the Flash object (if not smaller), click into it, and attempt to use the hotkey. In this case...I have no idea where I should click, because it could be outside the browser. Further, I don't believe I can assume that all browser address bars are similar amounts of pixels south from the top of the window.

*Additional complicating factors:*

* I want this to work for the user's default browser. (IE, Chrome, Firefox, Safari are my big targets.)
* AHK does not provide any native DOM or COM hooks to anything except IE.
* `Ctrl+Tab` and `Alt+Tab` shenanigans do not appear to work. That can get me to other tabs/windows, but returning to the tab/window with the Flash object still causes Flash to 'eat' further keyboard input.
* While I'd be open to using another scripting language than AHK if it could overcome this Flash focus hurdle, I do not know how to create a keylistener that sits in the users tray until activated by a hotkey.
* I have no access to the Flash object's code, and it contains no logic to interpret a key combination as a way to break focus or launch a script.