for (int i = 0; i < keyBindingsCount; i++) {
keySequence = (KeySequence) keyBindings[i];
// Now just double-check to make sure the key is still possible.
if (prefixSize > 0) {
if (keySequence.startsWith(currentState, false)) {
/*
* Okay, so we have a partial match. Replace the key binding
* with the required suffix completion.
*/
final KeyStroke[] oldKeyStrokes = keySequence