how to provide keyboard accelerators for object context menus? [message #273652] |
Fri, 08 October 2004 08:14  |
Eclipse User |
|
|
|
Hi,
I am creating an eclipse plugin which creates a new perspective and
views. These views display tree nodes, and tables which contain objects.
Each of these objects has a context menu associated with it, which work
fine. However I would like to be able to assign keyboard accelerators so
that I can use keyboard shortcuts such as "delete" to delete an object,
rather than having to use right-mouse-button -> delete.
I have used the jface setAccelerator(SWT.DEL) call, which decorates the
context menu to show that delete is the shortcut, but pressing delete
does nothing.
Can anyone offer advice on how I would set these shortcuts to work?
Thank you.
|
|
|
|
Re: how to provide keyboard accelerators for object context menus? [message #273692 is a reply to message #273652] |
Fri, 08 October 2004 16:06  |
Eclipse User |
|
|
|
Originally posted by: douglas.pollock.magma.ca
Stephen Rowles wrote:
> Each of these objects has a context menu associated with it, which work
> fine. However I would like to be able to assign keyboard accelerators so
> that I can use keyboard shortcuts such as "delete" to delete an object,
> rather than having to use right-mouse-button -> delete.
>
> Can anyone offer advice on how I would set these shortcuts to work?
partSite.getKeyBindingService.registerAction(deleteAction);
cheers,
d.
|
|
|
Powered by
FUDForum. Page generated in 0.03959 seconds