Element targetElement = (Element) fmgr.getCurrentEventTarget();
if (targetElement == null) {
targetElement = context.getDocument().getDocumentElement();
}
DocumentEvent d = (DocumentEvent) targetElement.getOwnerDocument();
DOMTextEvent textEvt = (DOMTextEvent) d.createEvent("TextEvent");
textEvt.initTextEventNS(XMLConstants.XML_EVENTS_NAMESPACE_URI,
"textInput",
true,
true,
null,
String.valueOf(evt.getKeyChar()));