Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to enable CTRL+C KeyBinding for custom handler
How to enable CTRL+C KeyBinding for custom handler [message #1400745] Mon, 14 July 2014 16:59 Go to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 296
Registered: February 2012
Location: Düsseldorf
Senior Member
I need some help with the activation of commands using key-bindings.
I have added a popupmenu for Copy/Paste in my RCP application using I have set the commands org.eclipse.ui.edit.copy and org.eclipse.ui.edit.paste respectively. In addition I have added a handler for the commands that activates the handlers when a specific activeMenuSelection is found. Now the commands work just fine from the context menu itself but it is not possible to trigger them with the keyboard binding CTRL+C, CTRL+V. Tracing shows that the default WidgetMethodHandler is active at the time the CTRL+C is pressed.

Can someone tell me what I am missing here?

Thanks in advance
Re: How to enable CTRL+C KeyBinding for custom handler [message #1401448 is a reply to message #1400745] Tue, 15 July 2014 16:28 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 573
Registered: January 2012
Senior Member

activeMenuSelection is only set while the context menu is shown. You need to add separate handlers for o.e.ui.edit.copy and .paste for your particular situations (e.g., for a particular activePart)

Previous Topic:Eclipse navigator extensions
Next Topic:Error when reverting p2 update from installation history
Goto Forum:

Current Time: Fri Apr 28 10:58:27 GMT 2017

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

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