Bug 4542 - Menu accelerators CTRL+ / and CTRL + SHIFT + / don't work (1FYAF8V)
Summary: Menu accelerators CTRL+ / and CTRL + SHIFT + / don't work (1FYAF8V)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:18 EDT by Knut Radloff CLA
Modified: 2001-11-13 17:05 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Radloff CLA 2001-10-11 14:18:37 EDT
I'm setting the CTRL + / and CTRL + SHIFT + /  as menu accelerators. They don't work.
To reproduce run the test case below and press CTRL + /. You should see output in the 
console. Press CTRL + R and you will see output as expected.

import com.ibm.swt.*;
import com.ibm.swt.widgets.*;

public class PR_1FYAF8V {
	public static void main(String[] args) {
		Shell shell = new Shell();
		Menu menuBar = new Menu(shell, SWT.BAR);
		MenuItem item0 = new MenuItem(menuBar, SWT.CASCADE);
		Menu menu = new Menu(menuBar);
		MenuItem item1 = new MenuItem(menu, SWT.PUSH);
		MenuItem item2 = new MenuItem(menu, SWT.PUSH);
		MenuItem item3 = new MenuItem(menu, SWT.PUSH);
		
		item0.setText("item0");
		item0.setMenu(menu);
		shell.setMenuBar(menuBar);
		item1.setText("item1	CTRL + /");
		item1.setAccelerator(SWT.CTRL | '/');
		item2.setText("item2	CTRL + SHIFT + /");
		item2.setAccelerator(SWT.CTRL | SWT.SHIFT | '/');
		item3.setText("item3	CTRL + R");
		item3.setAccelerator(SWT.CTRL | 'R');
		
		Listener listener = new Listener() {
			public void handleEvent(Event e) {
				System.out.println(e.widget);
			}
		};
		item1.addListener(SWT.Selection, listener);
		item2.addListener(SWT.Selection, listener);
		item3.addListener(SWT.Selection, listener);		
		
		shell.open();
		Display display = shell.getDisplay ();
		while (!shell.isDisposed ()) {
			if (!display.readAndDispatch ()) display.sleep ();
		}	
	
	}
}


NOTES:

VI (10/4/00 11:31:58 AM)
	There is code in Display that is commented out that maps the KeyPad keys for the accelerator table.  If I uncomment
	the SWT.KP_DIVIDE entry, I can cause the CTRL + SHIFT + '/' case to work but only when I use the '/' key in the
	numeric keypad.

SN (2/5/01 2:40:41 PM)
	Spent some time looking into this.  Need to write a DLL only example.
Comment 1 DJ Houghton CLA 2001-10-29 16:20:29 EST
PRODUCT VERSION:
SWT 0.44

Comment 2 Steve Northover CLA 2001-11-13 17:05:56 EST
Fixed in R2.0.