public boolean type(char key, java.awt.event.KeyEvent ev) {
        if ((key >= '0') && (key <= '9')) {
            int opt = (key == '0') ? 10 : (key - '1');
            if (opt < menuOptions.length)
                wdgmsg("cl", opt);
            ui.grabkeys(null);
            return (true);
        } else if (key == 27) {
            wdgmsg("cl", -1);
            ui.grabkeys(null);
            return (true);
        }
        return (false);
    }