How to prevent key binding execution repetition [message #988643] |
Fri, 30 November 2012 15:15  |
Eclipse User |
|
|
|
I need to prevent my application to perform the same action over and over again when that action is associated with a key biding, while the user is holding the trigger sequence.
I need to emulate the same behavior that can be achieved implementing a KeyListener#keyReleased, and perform the associated action only when the user releases the sequence.
There's anyway to do that?
|
|
|
|
Re: How to prevent key binding execution repetition [message #989291 is a reply to message #989035] |
Wed, 05 December 2012 09:48  |
Eclipse User |
|
|
|
After a lot of search, I can't find any satisfactory solution. So, I just removed the key bindings from plugin.xml and implemented all of them on KeyDown event from Display class, like this:
PlatformUI.getWorkbench().getDisplay().addFilter( SWT.KeyUp, new MyListener() );
But, I'm still looking for a better solution, based on some Eclipse API that provides any option to change the trigger event for bindings.
|
|
|
Powered by
FUDForum. Page generated in 0.50823 seconds