Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » KeyListener - combination keys
KeyListener - combination keys [message #459282] Wed, 29 November 2006 20:37 Go to next message
Eclipse UserFriend
Hi,
I have added a KeyListener to a text field. How would I recognize
combination keys for example when somebody presses Alt key + Arrow_Left
key.

Appreciate your help,

Dhiresh
Re: KeyListener - combination keys [message #459296 is a reply to message #459282] Thu, 30 November 2006 03:45 Go to previous message
Eclipse UserFriend
Originally posted by: remy.suen.gmail.com

Dhiresh wrote:
> I have added a KeyListener to a text field. How would I recognize
> combination keys for example when somebody presses Alt key + Arrow_Left
> key.

I think you want to check the KeyEvent's stateMask field and see if it's
equal to SWT.ALT (which I think is synonymous with SWT.MOD2?). Anyway, I
think it's preferable to use a MOD instead for platform independence.

Regards,
Rem
Previous Topic:How to disable cancel button of Progressbar
Next Topic:Switch between perspectives
Goto Forum:
  


Current Time: Sat Mar 22 12:55:31 EDT 2025

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

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

Back to the top