}
/* Bailout option if we face problems - by default set to false */
if (component instanceof MUnknownComponent) {
if (finder != null)
finder.markUsed(component);
recorder.record(new KeyStrokeAction(component.getComponentId(), ks, keyChar, scriptModel, windowMonitor)
.enscript(component));
return;
}
/*
* The final check. See whether anyone in the component heirarchy needs
* the key. We are handling the TabbedPane using change event - so do
* not record his keys.
*/
Component keyForComponent = whoNeedsTheKey(ks, component.getComponent());
if (keyForComponent == null)
return;
MComponent c = finder.getMComponentByComponent(keyForComponent);
if (c == null || c.recordOtherKeys())
return;
keyForComponent = checkInputMap(ks, finder.getTopLevelWindow(component.getComponent()));
if (keyForComponent == null)
return;
if (keyForComponent instanceof JLabel && ((JLabel) keyForComponent).getDisplayedMnemonic() == ks.getKeyCode())
return;
focusLost(null);
if (finder != null)
finder.markUsed(component);
recorder.record(new KeyStrokeAction(component.getComponentId(), ks, keyChar, scriptModel, windowMonitor)
.enscript(component));
}