Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » KeyBindings in RAP
KeyBindings in RAP [message #729579] Mon, 26 September 2011 10:54 Go to previous message
Amandeep Chahal is currently offline 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.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:problem when deploying sample RAP application in JBOSS 7.1.0
Next Topic:[ANN] RAP 2.0, API changes
Goto Forum:
  


Current Time: Sat May 18 17:19:46 EDT 2013

Powered by FUDForum. Page generated in 0.01812 seconds