| Summary: | KeyUp event lost | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | gangliu <clevers594> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | aaron, eclipse.felipe, enochs.brandon, remy.suen |
| Version: | 4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
gangliu
What are you trying to do ? (In reply to comment #1) > What are you trying to do ? Like the CS game, you can control the move direction by using 'A', 'S', 'D' and 'W'. I want to do something like that. The appropriate WM messages are making it to SWT. However they are some how being filtered by the event loop. The problem is on line 1902-1905 of the Widget class. It returns null from wmKeyUp if display.lastKey == 0. It appears that the previous wmKeyUp erases the state of lastKey. It seems like this should be a set of pressed key codes instead of a single value. (In reply to comment #4) > It seems like this should be a set of pressed key codes > instead of a single value. That would be just the start for the fix. The real problem is how to pair a key up with the corrected key down, you can't use the order (as they are different). (In reply to comment #5) > (In reply to comment #4) > > It seems like this should be a set of pressed key codes > > instead of a single value. > > That would be just the start for the fix. > The real problem is how to pair a key up with the corrected key down, you can't > use the order (as they are different). It seems like the order doesn't matter because the key code contains which key was released. (In reply to comment #6) > It seems like the order doesn't matter because the key code contains which key > was released. not true, try adding some println in the code and you will see (In reply to comment #7) > (In reply to comment #6) > > It seems like the order doesn't matter because the key code contains which key > > was released. > > not true, try adding some println in the code and you will see I added printlns in WM_KEYUP and it works as expected. (In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #6) > > > It seems like the order doesn't matter because the key code contains which key > > > was released. > > > > not true, try adding some println in the code and you will see > I added printlns in WM_KEYUP and it works as expected. what print and what keys are you testing? it can work for some simple cases, but it can't make to work all the time. try some more complex cases I'm pressing '+' then '-' then releasing '-' then releasing '+'. Using Spy++ and debug statements, I'm seeing WM_KEYUP for the right keys. 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. If you have further information on the current state of the bug, please add it. 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. This bug was marked as stalebug a while ago. Marking as wontfix. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag. |