Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How simultaneously press keyStroke and type character
How simultaneously press keyStroke and type character [message #904459] Tue, 28 August 2012 13:12 Go to next message
maherzia Mising name is currently offline maherzia Mising name
Messages: 6
Registered: February 2010
Junior Member
Hello,

I'm trying to press simultaneously "Alt" + "O" keyboard character.

keyboard awtk = keyboardFactory.getAWTkeyboard();
keyStroke alt = keyStrokes.ALT;
swtk.pressShortcut(alt);
swtk.typeCharacter("o".toCharArray()[0]);

These lines of code press keys separately, I need them at the same time.

Any help is welcome
Thanks in advance
Maherzia
Re: How simultaneously press keyStroke and type character [message #904477 is a reply to message #904459] Tue, 28 August 2012 13:49 Go to previous message
maherzia Mising name is currently offline maherzia Mising name
Messages: 6
Registered: February 2010
Junior Member
I found the solution :

KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.ALT,keyStroke.getInstance(0, 'O'));
Previous Topic: 64bit swtbot junit headless testing with ant
Next Topic:how to get draw2d objects on the regular eclipse views
Goto Forum:
  


Current Time: Fri Sep 19 22:01:00 GMT 2014

Powered by FUDForum. Page generated in 0.03207 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software