Re: Capture SHIFT key down in Editor [message #27485] |
Sun, 04 May 2003 18:22  |
Eclipse User |
|
|
|
Originally posted by: grant.slender.n0_spam_btbe.com
Hi,
Sorry for the re-post and x-post but I didn't get a reply and I'm not sure
which group is discussing PDE development ? Any tips on which group is which
? Is it eclipse.tools ?
I'd even appreciate a hint regarding how to make editors listen to
appropriate key events... I think its something to do with key bindings but
most things talk about action events and holding down the shift key is not
really and action so to speak ??
Thanks
"Grant" <grant.slender@n0_spam_btbe.com> wrote in message news:...
> Hi,
>
> Can someone point me to the best way to capture the status of the SHIFT
key
> within a custom editor.
>
> I can simulate this in a standalone SWT application, but of course as an
> EditorPart I don't get any keyevents. They get all consumed by the
> workspace.
>
> Any/all tips appreciated.
>
> Regards,
> Grant
>
>
|
|
|
Re: Capture SHIFT key down in Editor [message #27508 is a reply to message #27485] |
Mon, 05 May 2003 03:32  |
Eclipse User |
|
|
|
Originally posted by: tom.eicher.gmx.ch.nodomain
Grant,
"Grant" <grant.slender@n0_spam_btbe.com> wrote in message
news:b943qb$aoq$1@rogue.oti.com...
> Sorry for the re-post and x-post but I didn't get a reply and I'm not sure
> which group is discussing PDE development ? Any tips on which group is
which
> ? Is it eclipse.tools ?
eclipse.tools is deprecated and will be made read-only soon. This is a jface
related question and should probably go to eclipse.platform.
> I'd even appreciate a hint regarding how to make editors listen to
> appropriate key events... I think its something to do with key bindings
but
> most things talk about action events and holding down the shift key is not
> really and action so to speak ??
You can register a VerifyKeyListener with the editor's viewer (see
ITextViewerExtension.appendVerifyKeyListener) in order to be informed about
any key events (and possibly modify them). Instead of the viewer, you could
also go for the editors SWT widget (StyledText, for most text editors) and
do a similar thing there.
See also article
http://www.eclipse.org/articles/StyledText%201/article1.html on the
different events triggered by text editing.
HTH, Tom
|
|
|
Powered by
FUDForum. Page generated in 0.03151 seconds