Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Attach menu-item to function-key (How for F1, F2 etc. key ?)
Attach menu-item to function-key [message #675841] Wed, 01 June 2011 12:54 Go to next message
Kitesurfer () is currently offline Kitesurfer ()
Messages: 84
Registered: December 2009
Member
Hello,

I have a plugin which adds some menu-items that execute some code of my plugin. That works.
I also added/binded a function-key to those menu-items, for example :
sequence="M1+6"> which is Ctrl-6
sequence="M1+7"> which is Ctrl-7
sequence="M2+2"> which is Shift-2
That also works fine; pressing the function-key executes the code.

But what I want is not to use the Shift-2 but the F1-key (and for others the F2, F4 key etc). When I change the sequence to :
sequence="F2>
it doesn't work.

How do I fix/do this ?

Thx.
Re: Attach menu-item to function-key [message #675967 is a reply to message #675841] Thu, 02 June 2011 04:05 Go to previous message
Kitesurfer () is currently offline Kitesurfer ()
Messages: 84
Registered: December 2009
Member
I managed to do it, but not via my plugin.
Manually removing everything binded to the F2-key (via Preferences, General, Keys), and then binding F2 only to my own Command.

When I do above for the F1-key it doesn't work fully (might be a bug). When pressing the F1-key my own handler executes, but also a Help-screen pops up. It looks like the F1-key is in the "hart" of Eclipse ... but it should work like all function-keys: do what is configured.

Previous Topic:How to colour a method in an selfmade JavaTextEditor
Next Topic:Including Java Project in Plugin development
Goto Forum:
  


Current Time: Thu Jul 31 21:52:53 EDT 2014

Powered by FUDForum. Page generated in 0.01909 seconds