wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes RCP shortcut keys! Pls HELP! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "RCP shortcut keys! Pls HELP!" Watch "RCP shortcut keys! Pls HELP!" New topic
Author

RCP shortcut keys! Pls HELP!

Benjamin Malebana
Greenhorn

Joined: Jul 15, 2005
Posts: 7
Hi everyone I have an RCP(Rich Client Platform) Application with different toolBar actions, what I want is to have a shortcut key for each action the toolbar. My actions have been created programatically in .java file not in an xml file.

I have a code but it doesn't respont when a shortcut key assigned to it is pressed.

>>>>>>>>My xml code>>>>>>>>>>>>>>>>

<extension
point="org.eclipse.ui.commands">
<category
id="UserManagementWorkStation.category"
name="User Management Workstation"/>
<command
name="Undo all Modifications"
description="Undo all Modifications"
categoryId="UserManagementWorkStation.category"
id="UserManagementWorkStation.openMessage">
</command>
<keyBinding
commandId="UserManagementWorkStation.openMessage"
description="Add new User"
keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration"
keySequence= "CTRL+N">
</keyBinding>
</extension>
<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>My Java code>>>>>>>>>>>>>>>>
getViewSite().getKeyBindingService().registerAction(addUserAction);
getViewSite().getActionBars().setGlobalActionHandler(addUserAction.getId(), addUserAction);

The above java code is supposed to register the shortcut key is I am not mistaken.

Please help me guys I can't move from this point. Some people did give advice but its more Swing orientated I want the RCP orientated solution.
[ July 21, 2005: Message edited by: Benjamin Malebana ]
Benjamin Malebana
Greenhorn

Joined: Jul 15, 2005
Posts: 7
I got the shortcut keys working guys thank you. The problem I have just realised was that the CTRL+"ANY KEY" isn't working, then I resorted to Alt+"any key". Maybe its a problem of Eclipse 3.0 I am using, I am not sure.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RCP shortcut keys! Pls HELP!
 
Similar Threads
Accelerator keys
Using XSL to Render and Toggle Selected Radio Button or Selected Checkboxes
Problem with SWT Menu Item
Activating applet shortcut key in JSP page
Toolbar with color pallette ,different font styles and font sizes