| Summary: | An accelerator "F4" on menuitem invoked by Enter (CR) key when KeyListener presents | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Hiromu Hota <hiromu.hota> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.5 M3 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| See Also: |
https://git.eclipse.org/r/119373 https://git.eclipse.org/c/rap/org.eclipse.rap.git/commit/?id=a5f0e8dc80d394283da24b30ea66510449a8a764 |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
New Gerrit change created: https://git.eclipse.org/r/119373 Gerrit change https://git.eclipse.org/r/119373 was merged to [master]. Commit: http://git.eclipse.org/c/rap/org.eclipse.rap.git/commit/?id=a5f0e8dc80d394283da24b30ea66510449a8a764 |
Created attachment 273111 [details] Demo class to reproduce the bug My app has a menu with accelerator of F4 and a canvas with KeyListener. The issue is that this menu is invoked even when Enter (CR) key is pressed-down. I found that when these keys are pressed-down the following KeyEvent is issued: F4 (event.type=SWT.KeyDown, event.character='' (0), event.keyCode=16777229 (0x100000D), stateMask=0) Enter=CR (event.type=SWT.KeyDown, event.character='\r', event.keyCode=13 (0xD), stateMask=0) F4(0x100000D) can be (char) casted to 0xD, then matches Enter (CR). To reproduce the bug, one app has to have some widget with KeyListener attached.