static void install(SComponent component) {
public static void install(SComponent component) {
    static void install(SComponent component) {        ScriptListener[] scriptListeners = component.getScriptListeners();        for (int i = 0; i < scriptListeners.length; i++) {            ScriptListener scriptListener = scriptListeners[i];            if (scriptListener instanceof InputMapScriptListener)                component.removeScriptListener(scriptListener);        }        InputMap inputMap = component.getInputMap();        StringBuffer pressed = new StringBuffer();        StringBuffer typed = new StringBuffer();        StringBuffer released = new StringBuffer();        KeyStroke[] keyStrokes = inputMap.keys();        for (int i = 0; i < keyStrokes.length; i++) {            KeyStroke keyStroke = keyStrokes[i];            Object binding = inputMap.get(keyStroke);            /*            writeMatch(typed, keyStroke);            writeRequest(typed, binding);            */            switch (keyStroke.getKeyEventType()) {                case KeyEvent.KEY_PRESSED:                    writeMatch(pressed, keyStroke);                    writeRequest(pressed, binding);                    break;                case KeyEvent.KEY_TYPED:                    writeMatch(typed, keyStroke);                    writeRequest(typed, binding);                    log.debug("typed binding = " + binding);                    break;                case KeyEvent.KEY_RELEASED:                    writeMatch(released, keyStroke);                    writeRequest(released, binding);                    log.debug("released binding = " + binding);                    break;            }        }        if (pressed.length() > 0)            component.addScriptListener(new InputMapScriptListener("onkeydown", "return pressed_" + component.getName() + "(event)",                    "function pressed_" + component.getName() + "(event) {\n  " +                    "event = getEvent(event);\n  " +                    pressed.toString() + "  return true;\n}\n"));        if (typed.length() > 0)            component.addScriptListener(new InputMapScriptListener("onkeypress", "return typed_" + component.getName() + "(event)",                    "function typed_" + component.getName() + "(event) {\n  " +                    "event = getEvent(event);\n  " +                    typed.toString() + "  return true;\n}\n"));        if (released.length() > 0)            component.addScriptListener(new InputMapScriptListener("onkeyup", "return released_" + component.getName() + "(event)",                    "function released_" + component.getName() + "(event) {\n" +                    "event = getEvent(event);\n  " +                    released.toString() + "  return true;\n}\n"));    }