| Summary: | [KeyBindings] interactions: Delete (traversal) key triggers binding *and* sends the key event | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | adrian <stori> | ||||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||||
| Status: | RESOLVED INVALID | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | curtis.windatt.public, edoardo | ||||||
| Version: | 3.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 71016 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
adrian
Moving to Platform UI. Please try a more recent build, and verify the build number for the one you are running. This was an old problem that was fixed for M8. See Bug 53489, for example. Still happens in RC1. I believe it's not a problem for the StyledText editors because org.eclipse.ui.texteditor.AbstractTextEditor#createNavigationActions() does this: textWidget.setKeyBinding(SWT.DEL, SWT.NULL); (perhaps for a different reason?!). Could you provide a snippet showing the problem? Well, back to the reason the problem doesn't show in TextEditor: I think the best snippet would be to remove the line indicated in AbstractTextEditor textWidget.setKeyBinding(SWT.DEL, SWT.NULL); and see that, when pressing the Delete key, first the DELETE_NEXT will be invoked by the key binding service, and then SWT.DEL will also be activated in StyledText from the Delete key's event. If the bug you mentioned (Bug 53489) fixed this very problem, and did it by unbinding SWT.DEL in StyledText, then it didn't fix the *actual* problem (i.e., the key-binding service does not consume the Delete key it had already processed). *** Bug 69960 has been marked as a duplicate of this bug. *** This applies to all traversal keys. "Esc" is another example. It affects all platforms. Created attachment 13264 [details]
Patch to WorkbenchKeyboard
"event.doit" should have been set to false not true.
The patch has been committed to the 3.1 stream.... This fix has introduced bug 71016 , I am investigating what to do here, but I think that 71016 is more severe then this bug. I'm not even sure if this is a real problem or not. However, if you try to use "Esc W" as "copy" in a dialog, the dialog simply closes instead. None of the "Esc" prefixed commands seem to work. This is likely related to this problem. If not, another bug needs to be opened. I200409212000, GTK+ 2.4.9, KDE 3.3.0, Linux 2.6.8.1. Doug, is there something you are expecting me to look at? Steve: Not at the moment no. Silenio's been helpful so far.... *** Bug 76013 has been marked as a duplicate of this bug. *** I believe I found the cause of this problem. It is not the killing of the traversal event, but potentially how the out-of-order keys are processed. I believe what is happening is that the key is being allowed to arrive first and then the out-of-order processing is happening. Hence the duplicate entries. I've changed this so that out-of-order keys are processed after the traversal and before the key down. This should hopefully correct the problem. Please try out I200410190800 or later, and let me know how it goes. I've had to do further changes because of Bug 77129. Please try again in I200411010800. No reply. Closing as WORKSFORME. Please re-open if this is still a problem.... Finally time to go back to this... Still a problem in R3.1.0 (the key-binding service does not consume the Delete key it had already processed). I'll attach a sample testeditor plug-in, which installs a key listener on an editor's text widget. Start eclipse with -console, press Delete/Del key: the delete action is invoked via key-binding, but the SWT.DEL key event is also received in the widget. Created attachment 27458 [details]
Test case editor plug-in
Testcase editor plug-in (TEST EDITOR).
Moving Dougs bugs Is this still a problem in 3.3? PW Changes requested on bug 193523 Closing as INVALID. Several attempts were made to fix this, but so much has changed in 7 years that this bug serves no purpose. If this is still an issue, please reopen and attach an updated test case. |