Skip to main content



      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 09:12 Go to next message
Eclipse UserFriend
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 09:49 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 01:05:55 EDT 2025

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

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

Back to the top