Overriding Eclipse default Key listener [Solved] [message #501629] |
Thu, 03 December 2009 08:08 |
Goran Messages: 6 Registered: December 2009 |
Junior Member |
|
|
Hi !
I was wondering if it is possible to override Eclipse own "internal default" Key listener?
I have made a key listener that checks for CTRL+SHIFT+END
and it works ok, but Eclipse also reacts to it and does its thing
(marking text from cursor to end of page) in editor window.
This two actions (Eclipse and mine) 'collides'.
I have tried with keyevent.doit = false
but to no avail.
(Besides isn't that .doit for my listener and not Eclipse default listener?)
So, anyone with knowledge/experiences/ideas as to how to prevent Eclipse form reacting on "my" keybinding(s).
BR Goran
[Updated on: Fri, 11 December 2009 03:52] Report message to a moderator
|
|
|
Re: Overriding Eclipse default Key listener [message #501829 is a reply to message #501629] |
Thu, 03 December 2009 23:33 |
|
Hi,
you can define your own schema:
http://www.vogella.de/articles/EclipseCommands/article.html# keybinding
Best regards, Lars
--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter
Goran wrote:
> Hi !
>
> I was wondering if it is possible to override Eclipse own "internal
> default" Key listener?
>
> I have made a key listener that checks for CTRL+SHIFT+END
> and it works ok, but Eclipse also reacts to it and does its thing
> (marking text from cursor to end of page) in editor window.
>
> This two actions (Eclipse and mine) 'collides'.
>
> I have tried with keyevent.doit = false
> but to no avail.
>
> (Besides isn't that .doit for my listener and not Eclipse default
> listener?)
>
> So, anyone with knowledge/experiences/ideas as to how to prevent Eclipse
> form reacting on "my" keybinding(s).
>
> BR Goran
>
|
|
|
|
|
Re: Overriding Eclipse default Key listener [message #502477 is a reply to message #502414] |
Tue, 08 December 2009 13:24 |
Goran Messages: 6 Registered: December 2009 |
Junior Member |
|
|
Hi Lars !
I got the expected output except the last line with the function.
Could I have missed some setting?
Output in Console:
KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x0, keyCode = 0x40000, time = 22719658, character = 0x0)
KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x40000, keyCode = 0x20000, time = 22719938, character = 0x0)
KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x60000, keyCode = 0x1000008, time = 22720157, character = 0x0)
KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [CTRL+SHIFT+END, CTRL+, CTRL+SHIFT+])
Also regarding the schema - I might have put the
plugin_customization.ini file at the wrong place, will get
back on this once I am sure I got it in the right place.
also, Thank You for Your time and expertise !
BR Goran
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13167 seconds