Bug 41962 - Ctrl+Tab cannot be entered on KeysPreferencePage
Summary: Ctrl+Tab cannot be entered on KeysPreferencePage
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 39359 42537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-26 08:35 EDT by Douglas Pollock CLA
Modified: 2003-09-15 18:59 EDT (History)
4 users (show)

See Also:


Attachments
KeySequenceText patch (3.98 KB, patch)
2003-09-02 15:33 EDT, Douglas Pollock CLA
no flags Details | Diff
Fresh log file containing the stack trace (24.22 KB, text/plain)
2003-09-04 08:29 EDT, Douglas Pollock CLA
no flags Details
Patch for KeySequenceText (1.22 KB, patch)
2003-09-08 15:12 EDT, Douglas Pollock CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2003-08-26 08:35:17 EDT
Ctrl+Tab can not be set as a key binding for any command/action using the new
incarnation of the KeysPreferencePage.  This is partly by design of the page,
and partly due to the nature of SWT.  This happens because the text widget
allows all tab traversal, and SWT treats Ctrl+Tab as a traversal operation in a
text widget.  This could be fixed either by SWT, or by the KeysPreferencePage
itself.
Comment 1 Rene Leonhardt CLA 2003-08-29 08:46:18 EDT
You can paste key bindings with the mouse into the input field, but the Add 
button doesn't apply Ctrl+Tab as a new key binding.

I am not sure whether the existing Ctrl+Tab binding was working at all after 
upgrading to 3.0M3.
Comment 2 Douglas Pollock CLA 2003-09-02 15:33:43 EDT
Created attachment 5946 [details]
KeySequenceText patch

This patch allows you to bind to any valid key sequence that you can paste into
the text field.  It creates a modification listener that updates the sequence
based on changes to the underlying text widget.
Comment 3 Chris McLaren CLA 2003-09-03 17:17:30 EDT
applied patch. i don't think this is sufficient to fix this problem. assigning 
ctrl+tab is desired by many people, and needing to open a text editor, type in 
the formal grammar for the key sequence (which may be different than the 
translated key sequence), copy and paste it, is non-intuitive to say the 
least. keep this bug open; we need to talk to steve n. about the proper way to 
fix this.
Comment 4 Chris McLaren CLA 2003-09-03 17:35:39 EDT
REMOVED PATCH. with this patch, on win xp at least, simply opening the Keys 
preference page with a clear workspace, using the mouse to place the focus in 
the key sequence text widget, and pressing/holding 'shift' causes an immediate 
stack overflow error. there must be re-entry on the modify listener.
Comment 5 Douglas Pollock CLA 2003-09-04 08:28:53 EDT
I see no such problem on my end.  I do see a NullPointerException in 
KeysPreferencePage code, with repeat entries from KeySequenceText.  Are you 
getting the two mixed up?  The NullPointerException is caused by a missing 
check for null on line 1255 of KeysPreferencePage.  I'll attached my stack 
trace.
Comment 6 Douglas Pollock CLA 2003-09-04 08:29:24 EDT
Created attachment 5975 [details]
Fresh log file containing the stack trace
Comment 7 Douglas Pollock CLA 2003-09-05 10:18:06 EDT
From a conversation with Veronika Irvine:
There is not enough information in a traverse event to determine whether the
"Ctrl" mask was down.  To make this determination, we need an Event or a
KeyEvent.  This can be trapped at the global filter level, and the traversal
cancelled.

As a note, in addition to this, Motif arrow traversal cannot happen on text
widgets.  Only "Tab" and "Shift+Tab" are required.
Comment 8 Douglas Pollock CLA 2003-09-08 15:12:49 EDT
Created attachment 6021 [details]
Patch for KeySequenceText

This fix makes it so that KeySequenceText allows tab traversal only if the tab
has no modifiers keys or only the shift modifier key.  Otherwise, the traversal
is blocked.  This allows users to insert 'Ctrl+Tab', 'Ctrl+Shift+Tab', etc.,
etc. -- operating system permitting.
Comment 9 Douglas Pollock CLA 2003-09-08 15:15:48 EDT
chris: review/apply.  A conversation with Steve helped lead to a decent
solution.  It is still very slightly hacked because it assumes that 'Tab' and
'Shift+Tab' are the basic tab traversal keys.  A reasonable assumption, but it
would be better if SWT exported the traversal keys as constants.
Comment 10 Douglas Pollock CLA 2003-09-10 11:17:18 EDT
*** Bug 42537 has been marked as a duplicate of this bug. ***
Comment 11 Douglas Pollock CLA 2003-09-12 11:24:41 EDT
*** Bug 39359 has been marked as a duplicate of this bug. ***
Comment 12 Douglas Pollock CLA 2003-09-12 11:25:28 EDT
Again, please apply BOTH patches.  Bug 39359 relies on the first patch.
Comment 13 Chris McLaren CLA 2003-09-12 13:43:22 EDT
applied both patches
Comment 14 Steve Northover CLA 2003-09-15 18:59:44 EDT
Fixed > 20030915