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

Bug 46588

Summary: Provide a facility for doing keyboard look-ups
Product: [Eclipse Project] Platform Reporter: Douglas Pollock <douglas.pollock>
Component: SWTAssignee: Steve Northover <snorthov>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, eclipse.felipe, michaelvanmeekeren, Silenio_Quarti, stori
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 46589, 73017, 95603, 96076    

Description Douglas Pollock CLA 2003-11-13 11:21:08 EST
An API where a key code can be provided (equivalent to keyCode in Event) and 
the possible Shift and AltGr values are returned.  A hook into the keyboard 
layout.

So, on a US keyboard:        getKeys(0x37) => [0x37, 0x26]
On a Swiss German keyboard:  getKeys(0x37) => [0x37, 0x2F, 0x7C]


Alternatively, the AltGr values might not be necessary.

So, on a Swiss German keyboard:  getKeys(0x37) => [0x37, 0x2F]
Comment 1 Michael Van Meekeren CLA 2003-11-13 13:21:41 EST
Can you give an example of why this is useful?
Comment 2 Douglas Pollock CLA 2003-11-13 13:33:28 EST
On Windows, key bindings are resolved as follows (on a US keyboard):
"Ctrl+7"       matches "Ctrl+7"       and "Ctrl+&"
"Ctrl+Shift+7" matches "Ctrl+Shift+7" and "Ctrl+Shift+&"

As it is right now, we know when we receive the SWT event "Ctrl+Shift+&" that 
the event could also be considered "Ctrl+Shift+7".  However, when we 
receive "Ctrl+7", we have no way of knowing that it might also be 
considered "Ctrl+&".
Comment 3 Steve Northover CLA 2003-11-14 11:38:22 EST
I believe that this is the way that native accelerators work.  I'm adding SSQ 
to get his input.
Comment 4 Douglas Pollock CLA 2004-11-02 08:53:38 EST
*** Bug 69331 has been marked as a duplicate of this bug. ***
Comment 5 Douglas Pollock CLA 2005-10-27 11:09:02 EDT
Are there any plans to work on this for 3.2? 
Comment 6 Steve Northover CLA 2005-10-28 18:01:19 EDT
There wasn't any plan to do this for 3.2.  I'm adding Felipe because I 
remember there is a problem on GTK in this area and he knows what it is.
Comment 7 Lars Vogel CLA 2019-09-04 03:05:54 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.

If you have further information on the current state of the bug, please add it and remove the stalebug whiteboard tag. 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.

-