List of keyCodes for use with the Flex Type method
When calling the TypeKeys method against a FlexMenuBar control, for example to navigate, the menu navigation does not playback successfully. However, when using the Type method, the actions are successfully replayed. Therefore, what are the keycodes a user can specify when calling the Type method against a supported Flex object? Are the keycodes similar to that available for the TypeKeys method?
The Type method takes a string as an argument. This string can only be a keyCode, subsequently, if you use the Type method against a FlexTextArea control to set a value in the control (note: normally we would use the input method to set a value in a FlexTextArea control), this will produce an error.
FlexTextArea.Type("RIGHT") : this is incorrect as a FlexTextArea control cannot replay the key event
FlexTextArea.Input("RIGHT") : this will correctly replay the key event and input the value specified in the string argument
Therefore, to perform menu navigation of a FlexMenuBar, using the Type method is the correct approach rather than the TypeKeys method. Below are the list of keyCodes for use with the Flex Type method.
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
If key modifiers are required, then the type method takes a second parameter as shown below: