Why can't the Adobe Flash player send key strokes it doesn't handle to the browse in which it is running?

2

I'm a heavy web user that uses the address bar constantly while browsing the web. I often use Ctrl + T to open a new tab or Ctrl + D to move focus to the address bar so it is very annoying that these shortcut keys do not work when a Flash object has focus on the active browser tab.

I would happily give up all keyboard handling in the Flash Player in exchange for having keystrokes sent to the browser. In fact, as someone who has worked in software development for over 15 years it is hard to believe that Flash doesn't pass common browser shortcut keys to the browser or have an option to do so.

So my question is this:

Am I missing some option, some Flash shortcut key or some Firefox add-on that will alleviate my suffering?

Jim Clark

Posted 2009-12-17T11:13:12.187

Reputation: 287

Answers

3

It is probably because of security.

When flash has focus, browser has no idea what key is pressed.

Flash does know that, but it isn't trusted by browser. If browser was to trust Flash what was pressed, in a minute you would have bunch of malicious flash scripts that would falsify keystroke information and make your browser go wild.

This way, one potential security hole is prevented, although at expense of user comfort.

Josip Medved

Posted 2009-12-17T11:13:12.187

Reputation: 8 582

As another user pointed out here, this issue does not exist in Internet Explorer. Too I have such a preference for Firefox :-) – Jim Clark – 2010-12-02T19:32:28.517

That's a good point. I had not considered malicious Flash apps sending keystrokes to the browser. Perhaps it would be better if the browser always previewed keystrokes when Flash had focus? Surely there is some secure way to run a Flash app without it consuming focus.

I guess I'll have to wait for something better to replace the horror that is Flash. Perhaps HTML 5 will be a step in the right direction. – Jim Clark – 2009-12-18T12:10:19.000

Problem is that Flash is full scale application object. For all practical purposes it is an application. And only one application can have control over mouse and keyboard. I do not think that anything will change - for compatibility sake. Too many installations are already out there. – Josip Medved – 2009-12-18T20:27:29.113