03-24-2009 05:22 AM
hi, how can i simulate alt+arrow shortcut?
kind regards
03-24-2009 07:12 AM
You can use CTRL key of the keyboard to simulate ALT key using keyboard
Press the kudos button to thank the user who helped you.
If your problem was get solved then please mark the thread as "Accepted solution".
03-24-2009 07:19 AM
03-24-2009 07:30 AM
you want to simulate these keyevents on simulator or you need to trace these keyevents? if you want to trace keyevents then you can use STATUS_ALT as status in keyPadListener and Keypad.KEY_ESCAPE for escape key
Press the kudos button to thank the user who helped you.
If your problem was get solved then please mark the thread as "Accepted solution".
03-24-2009 07:34 AM
i need to trace them. i triedd to use what You've mentioned but what i got it was as i only pressed 'escape', not 'alt+escape'. Here is my code:
EventInjector.invokeEvent( new
EventInjector.invokeEvent( new
(char)Keypad.KEY_ESCAPE,KeypadListener.
STATUS_ALT, 150));
EventInjector.invokeEvent( new
(char)Keypad.KEY_ESCAPE,KeypadListener.
STATUS_ALT, 150));
EventInjector.invokeEvent( new
(char)Keypad.KEY_ALT, 0, 250));
03-24-2009 07:40 AM
Oh... You need to inject the events. Use this piece of code
EventInjector.KeyCodeEvent ev = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeE vent.KEY_DOWN, ((char)Keypad.KEY_ESCAPE), KeypadListener.STATUS_ALT, 500);
Press the kudos button to thank the user who helped you.
If your problem was get solved then please mark the thread as "Accepted solution".
03-24-2009 07:56 AM
i tried Your example and add post method :
EventInjector.KeyCodeEvent ev = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv
ent.KEY_DOWN, ((char)Keypad.KEY_ESCAPE), KeypadListener.STATUS_ALT, 500); ev.post();
but still it works as i pressed only escape, not 'alt+escape'..
03-24-2009 08:10 AM
03-27-2009 04:24 PM
03-28-2009 02:56 AM