Search code examples
apache-flexkeyboardfullscreen

Capturing Ctrl Key in full screen chart


I am able to capture Ctrl Key just fine in normal mode using event.ctrlKey

For some reason, the flag is not set in fullscreen.

protected function chart_itemClickHandler(event:ChartItemEvent):void {
  if(event.ctrlKey) {
    // do something (not executed in fullscreen mode)
  } else {
    // do something else
  }

Is there any trick to get this flag in fullscreen mode?


Solution

  • Almost all keyboard input is disabled in fullscreen mode. This includes the ctrl key. Adobe has done this for security reasons. Only the escape key is allowed, which closes fullscreen mode.

    An example: if you would make a fullscreen application that looks exactly like a default Windows logon screen, you could trick a user into typing in his Windows credentials into your application.

    I'm also afraid the short answer to your question is: there's no workaround. (Except perhaps if you would use ExternalInterface and some JavaScript to put the browser in fullscreen mode instead of the Flash application.)