Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RCP.
Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RCP. [message #897186] Mon, 23 July 2012 05:04 Go to next message
Nitika Doomra is currently offline Nitika DoomraFriend
Messages: 3
Registered: July 2012
Junior Member
I am developing an eclipse RCP application. My requirement is like I just want to override some of the keys like CTRL+N & CTRL+S . At the same time I want to keep all the other short keys working as by default.If I define my own key only for these new two short cut keys no other eclipse shortcut keys works.
Re: Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RC [message #897200 is a reply to message #897186] Mon, 23 July 2012 06:52 Go to previous messageGo to next message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hello Nitika Doomra,

could you please tell us how you are defining those shortcuts?
Are you using the org.eclipse.ui.bindings extension point in the plugin.xml or what exactly have you done?

Best regards,

Simon
Re: Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RC [message #897222 is a reply to message #897200] Mon, 23 July 2012 09:27 Go to previous messageGo to next message
Nitika Doomra is currently offline Nitika DoomraFriend
Messages: 3
Registered: July 2012
Junior Member
Hi Simon,
yes ,I am using org.eclipse.bindings extension point for creating shortcut key.
In plugin.xml :
<key
sequence="CTRL+N"
commandId="MYCOMMAND"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

>
</key>
as CTRL +N is predefined shortcut key for new project in windows too.
So presently a yellow color area appearing in my Application asking for the choice between new project and my command.
I just wanted to override CTrl+N to just directly open my command only.However at the same time all other shortkeys of eclipse for my Application should work normally.

Regards,
Nitika
Re: Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RC [message #897281 is a reply to message #897222] Mon, 23 July 2012 13:41 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

When you create your command/handler and assign the key binding of CTRL+N, you will give the key binding a context. You can define a new context and set the parent context to be org.eclipse.ui.contexts.window. This way you will still inherit all of the standard bindings but you can override the ones you want.

JD
Re: Overriding only few of the Windows ShortKeys and keeping all other Eclipse key as it is in my RC [message #897455 is a reply to message #897281] Tue, 24 July 2012 08:04 Go to previous message
Nitika Doomra is currently offline Nitika DoomraFriend
Messages: 3
Registered: July 2012
Junior Member
I found the solution to my problem by creating a new scheme and its parent org.eclipse.ui.defaultAcceleratorConfiguration. There by it will overwrite only the keys I have defined in my scheme and rest as it was earlier.
one more change is required that is in customization.ini file:
org.eclipse.ui/KEY_CONFIGURATION_ID= the Id of my new scheme .
Everything is running as required.
Thank you all!

Regards,
Nitika
Previous Topic:PreferenceNode is null when opening the PreferencesDialog
Next Topic:Hide "Run" menu (already using activities)
Goto Forum:
  


Current Time: Tue Mar 19 11:07:52 GMT 2024

Powered by FUDForum. Page generated in 0.01816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top