In the main part of my application (Not in any of the modules) I have:
private function onApplicationComplete(event:FlexEvent):void
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, true,
9999);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false,
9999);
}
Then onKeyDown:
private function onKeyDown(event:KeyboardEvent):void
{
if(event.ctrlKey)
{
switch(event.keyCode)
{
case 70: // CTRL+F
openSearchWindow();
break;
case 84: // CTRL+T
navigateToURL(new URLRequest("about:blank"),
'_blank');
break;
}
}
}
In Firefox (If you have it set to do so) it will open a new tab.
Granted, you have to select the "about:blank" and type in where you want
to go but that's what my users wanted. I haven't implemented "Open link
in new tab" yet but it hasn't been requested so I'll wait (I have enough
to do as it is).
--- In [email protected], Baz <li...@...> wrote:
>
> Interesting! How do you open a new tab? Detect the browser the execute
the
> appropriate Javascript?
>
> For the CTRL+F popup - that's your own flex popup with search
functionality
> right?
>