Bug 42024

Summary: KeySequenceText should have API to limit number of key strokes
Product: [Eclipse Project] Platform Reporter: Douglas Pollock <douglas.pollock>
Component: UIAssignee: Chris McLaren <csmclaren>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: csmclaren
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch for KeysPreferencePage and KeySequenceText none

Description Douglas Pollock CLA 2003-08-26 16:27:35 EDT
There should be a API to limit the maximum number of KeyStrokes that the
KeySequenceText will allow in its KeySequence.
Comment 1 Douglas Pollock CLA 2003-08-26 17:28:50 EDT
Created attachment 5864 [details]
Patch for KeysPreferencePage and KeySequenceText

KeySequenceText now has a setMaxStrokes, which makes sure that the key sequence
it generates is capped at the given value.  It exports a constant of INFINITE,
which means no capping.  KeysPreferencePage sets the cap to 4.
Comment 2 Douglas Pollock CLA 2003-08-26 17:29:24 EDT
Check the patch and then commit.  Change 4 to any value you want.
Comment 3 Chris McLaren CLA 2003-08-26 17:50:08 EDT
patch applied. works fine. changed CommandManager to reject KeyBindingDefinitions with strokes 
longer than 4 (to avoid the Keys preference page truncating selected key sequences)