| KeyBindings in RAP [message #729579] |
Mon, 26 September 2011 10:54  |
Amandeep Chahal Messages: 85 Registered: September 2011 Location: India |
Member |
|
|
I have a lot of actions in my RAP application (menu actions, context menu actions. other actions) for which I need to add keyboard shortcuts. These have been added by defining keybindings in my manifest using 'org.eclipse.ui.binding', All of these were working in my RCP version of the application, but in RAP they don't.
So, I used the following code to add my key bindings :
display.setData(RWT.ACTIVE_KEYS,new String[]{"My key combination -Ex CTRL+F11"});
display.addFilter(SWT.KeyDown, new Listener() {
public void handleEvent(Event event) {
// Invoke action here
}
});
This works as expected.
I want to know is if there's an easier/non-programmatic way to do it. Because this way of doing it is quite tedious, given the number of actions I need to register.
|
|
|