Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Key listener and Global actions in Eclipse.

I'm trying the addFilter( SWT.KeyDown, my_listener) solution.
I get expected key before keyBindingService() ... and do the work I must do
in my widget (sounds good),
It appears that other listener receive event even if I set event.doit to
false, the result is, for example on
Alt+Left arrow key: my widget scroll to left, lose focus, and Navigator
Action's Back is ran ... too much for only
one key stroke...

The only solution I've found is: If I handle key in my listener, then I
reset event.keyCode to 0: other listener
receive this keyCode and do what they want for keyCode 0.

Does anyone have a better solution to avoid other listener to handle a key
I process in my widget ?
Thanks for help.

Arnaud.



|---------+---------------------------------->
|         |           Douglas Pollock        |
|         |           <douglas.pollock@magma.|
|         |           ca>                    |
|         |           Sent by:               |
|         |           platform-swt-dev-admin@|
|         |           eclipse.org            |
|         |                                  |
|         |                                  |
|         |           23/02/2004 15:21       |
|         |           Please respond to      |
|         |           platform-swt-dev       |
|         |                                  |
|---------+---------------------------------->
  >---------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                     |
  |       To:       platform-swt-dev@xxxxxxxxxxx                                                                        |
  |       cc:                                                                                                           |
  |       Subject:  Re: [platform-swt-dev] Key listener and Global actions in Eclipse.                                  |
  |                                                                                                                     |
  >---------------------------------------------------------------------------------------------------------------------|




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On February 23, 2004 07:22 am, Arnaud De Muyser wrote:
> Is there a way to get the key stroke prior Eclipse's binding service ?

These kinds of questions should be asked on the newsgroup.

workbench.getCommandSupport().setKeyFilterEnabled(false);

Though IWorkbenchCommandSupport is still experimental API (i.e., we haven't

decided that this will be the final API for 3.0).  If you have comments
about
this API (e.g., missing functionality, etc.), please open a bug report
against Platform UI.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAOgxhLhh1LVU8SusRAv5GAJ9C4M09TTdN7F8TUewrb4lTlLH8EwCfa4GS
6Lt0+GVOCWKhCh6xS6ITn68=
=f1x1
-----END PGP SIGNATURE-----
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev







Back to the top