I'm trying to use the the keyboard keys as accelerators for my menu items. I don't know why this doesn't work : (I only hear a ping noise)
Menu menu = new Menu(gui.questionList); MenuItem miNewVrs = new MenuItem(menu,SWT.NULL); miNewVrs.setText("Create Ne&w Version\tCtrl+w"); miNewVrs.setAccelerator(SWT.CTRL + 'w'); miNewVrs.addSelectionListener(new SelectionAdapter(){ public void widgetSelected(SelectionEvent e){ // call a function } });
I have all of the relevant imports from SWT Thanks, Gadi