public void keyPressed (KeyEvent e) {
        char keychar = e.getKeyChar();
        int keycode = e.getKeyCode();
        if (keycode >= 0 && keycode < 256) {
            keymap[keycode] = true;
            lastkey = keycode;
            lastkeychar = keychar;
            if (wakeup_key == -1 || wakeup_key == keycode) {
                if (!eng.isRunning()) {
                    eng.start();
                    // key is cleared when it is used as wakeup key
                    keymap[keycode] = false;
                }
            }
        }
        /* shift escape = exit */
        if (e.isShiftDown()
            && e.getKeyCode() == KeyEvent.VK_ESCAPE
            && !eng.isApplet()) {
            System.exit(0);
        }
        // System.out.println(e+" keychar"+e.getKeyChar());
    }