public void keyTyped(KeyEvent keyEvent) {
        Iterator<PComponent> it = components.iterator();
        while (it.hasNext()) {
            PComponent comp = it.next();
            if (shouldHandleKeys) {
                if (comp.shouldHandleKeys())
                    comp.keyTyped(keyEvent);
            }
            else {
                if (comp instanceof PFrame) {
                    for (PComponent component : ((PFrame) comp).getComponents())
                        if (component.forceKeys())
                            component.keyTyped(keyEvent);
                }
                else if (comp.forceKeys())
                    comp.keyTyped(keyEvent);
            }
        }
    }