}
EventQueue eventQueue = toolkit.getSystemEventQueueImpl();
if (src != null) {
eventQueue.postEvent(new KeyEvent(src, id, time, modifiers,
code, keyChar, location));
// KEY_TYPED goes after KEY_PRESSED
if (id == KeyEvent.KEY_PRESSED) {
for (int i = 0; i < charsLength; i++) {
keyChar = chars.charAt(i);
if (keyChar != KeyEvent.CHAR_UNDEFINED) {
eventQueue.postEvent(new KeyEvent(src,
KeyEvent.KEY_TYPED, time, modifiers,
KeyEvent.VK_UNDEFINED, keyChar,
KeyEvent.KEY_LOCATION_UNKNOWN));
}
}