Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CTRL+Enter in a Textbox in a Wizard
CTRL+Enter in a Textbox in a Wizard [message #558713] Tue, 14 September 2010 07:53 Go to next message
Philipp Schill is currently offline Philipp SchillFriend
Messages: 11
Registered: July 2010
Junior Member
how do I implement a SWT text with a keylistener of CTRL+ENTER which causes a wizard to call performFinish.
Example would be the comment textfield in a CVS or SVN commit dialog wiazard.

[Updated on: Tue, 14 September 2010 07:53]

Report message to a moderator

Re: CTRL+Enter in a Textbox in a Wizard [message #558959 is a reply to message #558713] Wed, 15 September 2010 07:02 Go to previous message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member

You can use the traverse listener to do this.
Here is an example:
text.addTraverseListener(new TraverseListener() {
              public void keyTraversed(TraverseEvent e) {
		  if ((e.detail == SWT.TRAVERSE_RETURN) && (e.stateMask == SWT.CTRL)) {
			e.doit = true;


Lakshmi P Shanmugam
Previous Topic:Using Browser.evaluate and Browser.execute in non-top window contexts?
Next Topic:Enabling/Disabling a command
Goto Forum:

Current Time: Wed Jan 29 17:21:34 GMT 2020

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

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

Back to the top