Sunday, March 28, 2010

Can I simulate a keypress with...

Hope someone can help me.

I'm developing an application for use on a tablet PC where the user has the option to make multiple selections with a List Component. I need the ability to simulate the CTRL key being pressed since the keyboard will most likely not be available so the user can select and de-select items from the list. I will most be attaching the code to a button that will open the List component.

Thanks

Maury

Can I simulate a keypress with...

If(Key.isDown(17) %26amp;%26amp; Key.isDown(48)){

}

Key.isDown checks if the key is pressed. 17 is the key code for ctrl, and 48 is the key code for ''0'' (without '' ''). This is the full list of key codes:http://people.uncw.edu/tompkinsj/112/FlashActionScript/keyCodes.htm

No comments:

Post a Comment