Package net.sf.jiga.xtended.impl.system.input

Examples of net.sf.jiga.xtended.impl.system.input.KeyEventWrapper


    }

    public boolean dispatchKeyEvent(KeyEvent e) {
        try {
            out.writeInt(DISPATCH_KEY);
            out.writeObject(new KeyEventWrapper(e.getWhen(), e.getKeyCode(), e.getID()));
            out.writeInt(e.getModifiers());
            out.writeChar(e.getKeyChar());
            out.flush();
            return true;
        } catch (IOException ex) {
View Full Code Here


        return imodel;
    }

    private InteractiveModel loadTestKeyboardModel(InteractiveModel imodel) {
        imodel.setInnerResourceModeEnabled(true);
        KeyEventWrapper up = new KeyEventWrapper(0, KeyEvent.VK_UP, KeyEvent.KEY_PRESSED), down = new KeyEventWrapper(0, KeyEvent.VK_DOWN, KeyEvent.KEY_PRESSED),
                right = new KeyEventWrapper(0, KeyEvent.VK_RIGHT, KeyEvent.KEY_PRESSED), left = new KeyEventWrapper(0, KeyEvent.VK_LEFT, KeyEvent.KEY_PRESSED);
        imodel.animsID_default = "arrow";
        imodel.addAnimMap("arrow", 8);
        imodel.addAnimMap("arrow down", 0);
        imodel.addAnimMap("arrow down left", 1);
        imodel.addAnimMap("arrow left", 2);
        imodel.addAnimMap("arrow up left", 3);
        imodel.addAnimMap("arrow up", 4);
        imodel.addAnimMap("arrow up right", 5);
        imodel.addAnimMap("arrow right", 6);
        imodel.addAnimMap("arrow down right", 7);
        imodel.addKeyEventWrapperMapping(down, "arrow down");
        Vector<KeyEventWrapper> sequence = new Vector<KeyEventWrapper>();
        sequence.add(down);
        sequence.add(left);
        imodel.addKeyEventWrapperMapping(new KeyEventWrapper(sequence), "arrow down left", true);
        imodel.addKeyEventWrapperMapping(left, "arrow left");
        sequence = new Vector<KeyEventWrapper>();
        sequence.add(up);
        sequence.add(left);
        imodel.addKeyEventWrapperMapping(new KeyEventWrapper(sequence), "arrow up left", true);
        imodel.addKeyEventWrapperMapping(up, "arrow up");
        sequence = new Vector<KeyEventWrapper>();
        sequence.add(up);
        sequence.add(right);
        imodel.addKeyEventWrapperMapping(new KeyEventWrapper(sequence), "arrow up right", true);
        imodel.addKeyEventWrapperMapping(right, "arrow right");
        sequence = new Vector<KeyEventWrapper>();
        sequence.add(down);
        sequence.add(right);
        imodel.addKeyEventWrapperMapping(new KeyEventWrapper(sequence), "arrow down right", true);
        return imodel;
    }
View Full Code Here

                    new int[][]{{}}, new String[]{}, new String[]{});
            model.animsID_default = _defaultAction;
            /**
             * timing range
             */
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, -1, -1, 3000), "");
            /**
             * common moves
             */
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED), "stance forwards");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED), "stance backwards");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED), "stance crouch");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED), "stance jump");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED), "stance LP");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED), "stance MP");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED), "stance HP");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED), "stance LK");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED), "stance MK");
            model.addKeyEventWrapperMapping(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED), "stance HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch block H");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch block H");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance crouch HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump backwards HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards LP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards MP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards HP");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards LK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards MK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards HK");
            seq = new Vector<KeyEventWrapper>();
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_up")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
            seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
            model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance jump forwards HK");
            /**
             * super moves
             */
            if (SUPERMOVEST1.equals(attr.get("eventMapTYPE"))) {
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super LK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super LK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super MK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super MK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super HK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super HK");
            } else if (SUPERMOVEST2.equals(attr.get("eventMapTYPE"))) {
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super LK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super MK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HK")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance super HK");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards super LP");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards super MP");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance forwards super HP");
            }
            /**
             * super combo moves
             */
            /**
             * fireballs
             */
            if (SUPERMOVEST1.equals(attr.get("eventMapTYPE"))) {
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super L");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super L");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super M");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super M");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super H");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_PRESSED, 2000));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_backwards")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super H");
            } else if (SUPERMOVEST2.equals(attr.get("eventMapTYPE"))) {
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_LP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super L");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_MP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super M");
                seq = new Vector<KeyEventWrapper>();
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_forwards")), KeyEvent.KEY_PRESSED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_down")), KeyEvent.KEY_RELEASED));
                seq.add(new KeyEventWrapper(0, _keyCodeMap.get(key.valueOf(attr.get("player") + "_HP")), KeyEvent.KEY_PRESSED));
                model.addKeyEventWrapperMapping(new KeyEventWrapper(seq), "stance fireball super H");
            }
            registerKEMap((id) attr.get("player"), (String) attr.get("eventMapTYPE"), model);
        }
    }
View Full Code Here

                            break;
                        case RemoteAlgorithm.CANCEL_GAME:
                            algInterface.cancelGame();
                            break;
                        case RemoteAlgorithm.DISPATCH_KEY:
                            KeyEventWrapper e = (KeyEventWrapper) in.readObject();
                            algInterface.dispatchKeyEvent(new KeyEvent(new JLabel("remote player"), e.get_ID(), System.currentTimeMillis(), in.readInt(), e.get_keyCode(), in.readChar()));
                            break;
                        default:
                            break;
                    }
                } catch (ClassNotFoundException ex) {
View Full Code Here

        return highestKeysSequenceTiming;
    }

    /***/
    private KeyEventWrapper processMatcher(SortedMap<Long, KeyEventWrapper> filteredEventsSequence) {
        KeyEventWrapper match = null;
        synchronized (filteredEventsSequence) {
            SortedMap<Long, KeyEventWrapper> tail = filteredEventsSequence;
            while (!tail.isEmpty()) {
                Vector<KeyEventWrapper> seq = new Vector(tail.values());
                KeyEventWrapper combo = new KeyEventWrapper(seq);
                match = matchKeyEvents(combo);
                if (match instanceof KeyEventWrapper) {
                    break;
                } else {
                    tail = filteredEventsSequence.tailMap(tail.firstKey() + 1);
View Full Code Here

        }
        /* add currently pressed keys */
        synchronized (pressedKeys) {
            for (Iterator<Map.Entry<Long, KeyEventWrapper>> i = pressedKeys.entrySet().iterator(); i.hasNext();) {
                Map.Entry<Long, KeyEventWrapper> entry = i.next();
                KeyEventWrapper kew = entry.getValue();
                kew.consumeReset();
                filteredEventsSequence.put(entry.getKey(), kew);
            }
        }
        if (isDebugEnabled()) {
            System.out.println(JXAenvUtils.log("pressed keys added = " + pressedKeys.size(), JXAenvUtils.LVL.APP_NOT));
View Full Code Here

    @param readKew represents a sequence of keyEvents
     * @return a singleton map with the key True or False whether something has been matched or not, resp.
   
    @see #keyEvents*/
    private KeyEventWrapper matchKeyEvents(KeyEventWrapper readKew) {
        KeyEventWrapper match = null;
        if (!readKew.isConsumed()) {
            /** find direct link to an Animation for the specified sequence (many-to-one)*/
            if (keyEvents.containsKey(readKew)) {
                readKew.consume();
                match = readKew;
            }
            /** look for the oldest unconsumed read keyEvent in the specified sequence (one-to-one)*/
            if (match == null) {
                for (Iterator<KeyEventWrapper> it = readKew.get_sequence().iterator(); it.hasNext();) {
                    KeyEventWrapper rKew = it.next();
                    if (!rKew.isConsumed()) {
                        if (keyEvents.containsKey(rKew)) {
                            rKew.consume();
                            match = rKew;
                        }
                        break;
                    }
                }
View Full Code Here

   
    @param kew the KeyEventWrapper to send as PRESSED
   
    @param when the timestamp at which the event occurred */
    private void sendKeyEventWrapperPressed(KeyEventWrapper kew, long when) {
        KeyEventWrapper addKew = null;
        if (isDebugEnabled()) {
            System.out.println(JXAenvUtils.log("dispatch new key pressed " + kew, JXAenvUtils.LVL.APP_NOT));
        }
        Player.id player = attributes.containsKey("player") ? (Player.id) attributes.get("player") : null;
        Vector<Long> removals = new Vector<Long>();
        synchronized (pressedKeys) {
            for (Iterator<Map.Entry<Long, KeyEventWrapper>> i = pressedKeys.entrySet().iterator(); i.hasNext();) {
                Map.Entry<Long, KeyEventWrapper> ckew = i.next();
                /** check for the correct keycode*/
                if (Player._checkAxisKeyCode(player, kew.get_keyCode()) == ckew.getValue().get_keyCode()) {
                    addKew = ckew.getValue();
                    removals.add(ckew.getKey());
                    if (isDebugEnabled()) {
                        System.out.println(JXAenvUtils.log("continue pressed " + ckew, JXAenvUtils.LVL.APP_NOT));
                    }
                }
            }
            if (removals.isEmpty()) {
                if (isDebugEnabled()) {
                    System.out.println(JXAenvUtils.log("start pressed " + kew, JXAenvUtils.LVL.APP_NOT));
                }
            }
            for (Long r : removals) {
                pressedKeys.remove(r);
            }
        }
        if (addKew == null) {
            addKew = new KeyEventWrapper(kew.get_when(), Player._checkAxisKeyCode(player, kew.get_keyCode()), kew.get_ID(), kew.get_timing());
        }
        pressedKeys.put(when, addKew);
    }
View Full Code Here

        SortedMap<Long, KeyEventWrapper> kews = new TreeMap<Long, KeyEventWrapper>();
        Vector<Long> removals = new Vector<Long>();
        synchronized (pressedKeys) {
            for (Iterator<Map.Entry<Long, KeyEventWrapper>> i = pressedKeys.entrySet().iterator(); i.hasNext();) {
                Map.Entry<Long, KeyEventWrapper> pressed = i.next();
                KeyEventWrapper pressedKew = pressed.getValue();
                /** select the pressed event and remove from pressedkeys stack*/
                if (Player._checkAxisKeyCode(player, kew.get_keyCode()) == pressedKew.get_keyCode()) {
                    pressedKew = new KeyEventWrapper(pressedKew.get_when(), pressedKew.get_keyCode(), KeyEvent.KEY_PRESSED, when - pressedKew.get_when());
                    kews.put(when, pressedKew);
                    removals.add(pressed.getKey());
                }
            }
            for (Long r : removals) {
                pressedKeys.remove(r);
            }
        }
        kews.put(when + 1, new KeyEventWrapper(when + 1, Player._checkAxisKeyCode(player, kew.get_keyCode()), KeyEvent.KEY_RELEASED));
        threadedEventsSequence.putAll(kews);
    }
View Full Code Here

                long now = e.getWhen();
                if (hasAttribute("player") ? isPlayerKeycode(e) : true) {
                    /* manage key pression time*/
                    switch (e.getID()) {
                        case KeyEvent.KEY_PRESSED:
                            sendKeyEventWrapperPressed(new KeyEventWrapper(now, e.getKeyCode(), KeyEvent.KEY_PRESSED), now);
                            break;
                        case KeyEvent.KEY_RELEASED:
                            sendKeyEventWrapperReleased(new KeyEventWrapper(now, e.getKeyCode(), KeyEvent.KEY_RELEASED), now);
                            break;
                        default:
                            break;
                    }
                    b = true;
View Full Code Here

TOP

Related Classes of net.sf.jiga.xtended.impl.system.input.KeyEventWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.