Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Help with MenuItem.setAccelerator() on OS X(Can't distinguish shifted and non-shifted minus character)
Help with MenuItem.setAccelerator() on OS X [message #531391] Tue, 04 May 2010 17:23 Go to next message
Doug M is currently offline Doug MFriend
Messages: 18
Registered: December 2009
Junior Member
I would like to specify that cmd-minus is the key for a "zoom out" menu item. Using
item.setAccelerator(SWT.MOD1 | '-')

shows the correct command glyphs in the menu item. However, it responds to both cmd-minus and cmd-shift-minus (that's cmd-underline).

I want it to respond only to cmd-minus.

If I try different base keys, the shifted and non-shifted versions are correctly distinguished. For example,

item.setAccelerator(SWT.MOD1 | 'd');
responds only to cmd-d, and

item.setAccelerator(SWT.SHIFT | SWT.MOD1 | 'd');
responds only to cmd-shift-d, both showing correct glyphs in the menu item.

I tried SWT.KEYCODE_BIT with the actual keycode, but that also fails to distinguish minus and underline.

Can anyone explain, or suggest a solution?

TIA,
Doug
Re: Help with MenuItem.setAccelerator() on OS X [message #531577 is a reply to message #531391] Wed, 05 May 2010 12:54 Go to previous message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
> Can anyone explain, or suggest a solution?

It sounds like a bug to me. Can you raise a bug request at
https://bugs.eclipse.org/bugs/

Thanks,
Praveen.
Previous Topic:Problem with SWT Standalone app on Solaris
Next Topic:icons in Combo...
Goto Forum:
  


Current Time: Thu Apr 25 18:50:32 GMT 2024

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

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

Back to the top