Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 285023

Summary: [Browser] Additional KeyDown event is sent on loaded websites
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Grant Gayed <grant_gayed>
Severity: normal    
Priority: P3 CC: nickel.de, Silenio_Quarti
Version: 3.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Remy Suen CLA 2009-07-29 11:50:10 EDT
1. Run the code below.
2. Select the webpage on the left after eclipse.org is done loading.
3. Hit Ctrl+Shift+W, you will see two events, one from WebSite with a keyCode of 0, and another one from Browser with a keyCode of 119 (the character 'w').

This is causing problems for me where I have a browser in one of my editors, and I use Ctrl+Shift+W, then only the first editor goes away. At the UI level we seem to end up getting both Ctrl+W and Ctrl+Shift+W, so Ctrl+W is processed and the single active editor is closed when I expect all my editors to close.

public static void main(String[] args) {
	Listener listener = new Listener() {
		public void handleEvent(Event e) {
			if (e.widget instanceof Shell) {
				return;
			}
			System.out.println(e.widget + "\t" + ((char) e.keyCode));
		}
	};
	
	Display d = new Display();
	d.addFilter(SWT.KeyDown, listener);
	d.addFilter(SWT.Traverse, listener);
	
	Shell s = new Shell(d);
	s.setLayout(new FillLayout());
	
	new Browser(s, SWT.NONE).setUrl("http://www.eclipse.org");
	new Button(s, SWT.PUSH);
	
	s.open();
	
	while (!s.isDisposed()) {
		if (!d.readAndDispatch()) {
			d.sleep();
		}
	}
	d.dispose();
}
Comment 1 Remy Suen CLA 2009-07-29 11:56:21 EDT
Maybe related to bug 269733?
Comment 2 Dani Megert CLA 2010-10-26 08:22:13 EDT
*** Bug 328691 has been marked as a duplicate of this bug. ***
Comment 3 Leo Ufimtsev CLA 2017-08-03 12:34:19 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 4 Eclipse Genie CLA 2020-06-05 00:52:21 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.