Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 69331 - [KeyBindings] Ctrl+Numpad_Enter does Ctrl+M's command
Summary: [KeyBindings] Ctrl+Numpad_Enter does Ctrl+M's command
Status: RESOLVED DUPLICATE of bug 46588
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Douglas Pollock CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-05 21:51 EDT by adrian CLA
Modified: 2004-11-02 08:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adrian CLA 2004-07-05 21:51:10 EDT
When Ctrl+Numpad_Enter is not defined in the active key-binding scope, it
activates the command bound to Ctrl+M, rather than being sent as a key event.

Test scenario:  Open a file with Text Editor, Ctrl+Numpad_Enter will
maximize/restore the edit window.
Comment 1 Douglas Pollock CLA 2004-07-06 14:11:10 EDT
When "Ctrl+Numpad_Enter" is pressed, the keyCode is 0x1000050 and the character 
is 0xD.  The first matching key stroke is "Ctrl+Numpad_Enter" (obviously).  
However, we have fall-through code to accomodate characters like "Ctrl+&" and 
"Ctrl+Shift+&" (example for U.S. keyboard).  This fall-through code translates 
the 0xD into a "Ctrl+M". 
 
It might be possible to filter out numpad keys in some way from this 
fall-through code. 
Comment 2 adrian CLA 2004-07-07 15:37:27 EDT
Probably similar to the Ctrl+Numpad_Enter key grabbing, the Ctrl+Shift+Backspace
key (not defined in the textEditor context) does not arrive as a key event to
the widget - instead, the command bound to Ctrl+Backspace is run.

The key binding service should not take over keys which are not defined in the
active scope!
Comment 3 Douglas Pollock CLA 2004-07-07 15:46:44 EDT
But, as I said, a user would expect that pressing "Ctrl+Shift+7" might match 
"Ctrl+Shift+7" or "Ctrl+Shift+&", for example.  While the "Numpad_Enter" 
scenario is different from the perspective of the user, SWT does not provide 
any information to distinguish these cases easily (i.e., there is no facility 
for retrieving the keyboard layout). 
 
I imagine I might build a list of known problem keys, and simply make a special 
case for them. 
Comment 4 Douglas Pollock CLA 2004-11-02 08:53:37 EST

*** This bug has been marked as a duplicate of 46588 ***