[Mails] Hot Keys

Q
We have a requirement wherein the users need to have the ability to have hotkeys /shortcuts to perform certain operations, like (triggering a particular link, submiting a form ).Does Flex platform have a built macro / shortcut support to do something like this?

W

There’s no built-in support in the framework as of now. It’s been on the “nice to have” features list, but somehow didn’t make it in this release. Now, this is something you could build on your own easily though. You’d have to listen for the key events on the “system manager” object in the “capture” phase.

systemManager.addEventListener("keyUp", globalKeyUp, true /* capture */ );

You can allow the developer to then map specific keys to specific event handlers.

And so on.

Manish

Advertisements

7 Responses to [Mails] Hot Keys

  1. acnesiac says:

    is there any more examples ?

  2. Amita says:

    Thanks very much for this info!
    For sample code add mx:script

    public function createListener():void {
    systemManager.addEventListener(“keyUp”, globalKeyUp, true /* capture */ );
    }

    public function globalKeyUp(e:KeyboardEvent):void {

    if ((e.keyCode==65) && (e.ctrlKey) && (e.altKey))
    {
    txtName.setFocus();
    }
    }

  3. Thanks very much for this info!
    For sample code add mx:script

  4. Joseph says:

    I’m not sure what version of Flex you have but with Flex 3.2, there IS NO: SystemManager.addEventListener( …

    1061: Call to a possibly undefined method addEventListener through a reference with static type Class.

  5. timmmyy says:

    It’s because you have to use

    systemManager.addEventListener( …

    No capital S 🙂

  6. I had been at this time there last year plus many of us turned enslaved a game present the place that the contestant needed to estimate the work connected with 6 months time persons.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: