Bug 346475 - The Alt-Key mnemonics do not work in some cases
Summary: The Alt-Key mnemonics do not work in some cases
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 177294 244061 (view as bug list)
Depends on:
Blocks: 570768
  Show dependency tree
 
Reported: 2011-05-19 11:21 EDT by Serge Beauchamp CLA
Modified: 2021-02-15 02:58 EST (History)
5 users (show)

See Also:


Attachments
Fix. (1.51 KB, patch)
2011-05-19 11:30 EDT, Serge Beauchamp CLA
no flags Details | Diff
Testcase (2.10 KB, application/octet-stream)
2021-02-12 02:08 EST, Rolf Theunissen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Beauchamp CLA 2011-05-19 11:21:11 EDT
When 1) there is two menu items in the menu bar, one of which has a mnemonic set for a given letter (say, 'P'), and another menu doesn't have a mnemonic, but starts with the same letter, the user won't be able to access that menu using the Alt-P shortcut from views that have a control as focused widget.
Comment 1 Serge Beauchamp CLA 2011-05-19 11:26:49 EDT
Reproducibility steps:

1) Create a plugin that adds a new menu that starts with 'P', but doesn't contain any mnemonic, for example the 'Hello World' PDE plugin template, and change the name of the "Sample Menu" menu to "Profiler".

2) Once that plugin is installed, set the 'Package Explorer' view active, and verify that the key shortcut 'Alt-P' does not work.  

3) Set the 'Outline' view active, and verify that the key shortcut 'Alt-P' does work.  

The shortcut should work in both cases.
Comment 2 Serge Beauchamp CLA 2011-05-19 11:30:42 EDT
Created attachment 196128 [details]
Fix.

Here's a fix for this bug.
Comment 3 Lars Vogel CLA 2019-11-14 02:12:37 EST Comment hidden (obsolete)
Comment 4 Rolf Theunissen CLA 2021-02-01 13:51:21 EST
Problem is still present, and leads to unpredictable behavior.
Comment 5 Rolf Theunissen CLA 2021-02-01 13:52:05 EST
*** Bug 244061 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Genie CLA 2021-02-01 14:31:27 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175585
Comment 7 Rolf Theunissen CLA 2021-02-12 02:08:06 EST
Created attachment 285530 [details]
Testcase
Comment 8 Rolf Theunissen CLA 2021-02-12 02:11:06 EST
Note that this bug is only triggered when SWT.KeyDown or SWT.KeyUp is hooked. When not hooked, the default windows behavior is used this is the scope of Bug 570998.
Comment 9 Rolf Theunissen CLA 2021-02-15 02:58:13 EST
*** Bug 177294 has been marked as a duplicate of this bug. ***