Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Simulate the enter key
Simulate the enter key [message #541822] Tue, 22 June 2010 11:54 Go to next message
Pascal G is currently offline Pascal G
Messages: 157
Registered: July 2009
Senior Member
Hi everyone,

I have a couple of test that make use of the native key event
(keyboard,typeText(), control.pressShortcut() and the likes). Everything
seemed to work well, until recently when I added some validation. The
Enter key does not seem to be properly emulated depending on the OS.

I read a couple of articles online saying that I should use
Keystrokes.CR to emulate the Enter key. That works very well on Ubuntu,
but under CentOS it doesn't work. I did some testing and when I used
Keystrokes.LF, it works under CentOS, but it doesn't work anymore in Ubuntu!

I was wondering if anyone had any clue to why this is happening...

I'm using the SWTKeyboardStrategy (so Display.post()) with Eclipse 3.5,
JDK 1.6. Ubuntu is a 10.04 and CentOS is a 5.5
--
Pascal GĂ©linas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Re: Simulate the enter key [message #541849 is a reply to message #541822] Tue, 22 June 2010 13:08 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Hi,

This could either be because of a different version of gtk or a bug in SWT.

If this is something that you could reproduce using a minimal SWT-only
API you might get some traction on the swt-dev list.

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 6/22/10 8:54 AM, Pascal Gelinas wrote:
> Hi everyone,
>
> I have a couple of test that make use of the native key event
> (keyboard,typeText(), control.pressShortcut() and the likes). Everything
> seemed to work well, until recently when I added some validation. The
> Enter key does not seem to be properly emulated depending on the OS.
>
> I read a couple of articles online saying that I should use
> Keystrokes.CR to emulate the Enter key. That works very well on Ubuntu,
> but under CentOS it doesn't work. I did some testing and when I used
> Keystrokes.LF, it works under CentOS, but it doesn't work anymore in
> Ubuntu!
>
> I was wondering if anyone had any clue to why this is happening...
>
> I'm using the SWTKeyboardStrategy (so Display.post()) with Eclipse 3.5,
> JDK 1.6. Ubuntu is a 10.04 and CentOS is a 5.5
Previous Topic:Problems running headless under Xvnc
Next Topic:CTab Item double click
Goto Forum:
  


Current Time: Sat Aug 23 05:34:44 EDT 2014

Powered by FUDForum. Page generated in 0.01856 seconds