Bug 42024 - KeySequenceText should have API to limit number of key strokes
Summary: KeySequenceText should have API to limit number of key strokes
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-26 16:27 EDT by Douglas Pollock CLA
Modified: 2003-08-26 17:50 EDT (History)
1 user (show)

See Also:


Attachments
Patch for KeysPreferencePage and KeySequenceText (6.31 KB, patch)
2003-08-26 17:28 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 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)