public Shortcut(JComponent source, KeyStroke shortcut, String name, final boolean autoRepeat, final AbstractAction action){
        isRepeated = false;
        
        source.addFocusListener(new FocusListener() {

            @Override
            public void focusGained(FocusEvent e) {
                isRepeated = false;
            }

            @Override
            public void focusLost(FocusEvent e) {
                isRepeated = false;
            }
        });
        
        source.getInputMap().put(shortcut, name);
        source.getActionMap().put(name,
                new AbstractAction(){
                    public void actionPerformed(ActionEvent e) {
                        if(!isRepeated){
                            if(!autoRepeat){
                                isRepeated = true;
                            }
                            action.actionPerformed(e);
                        }
                    }
                });
        
        if(!autoRepeat){
            source.getInputMap().put(KeyStroke.getKeyStroke(shortcut.getKeyCode(), shortcut.getModifiers(), true), name + "µ");
            source.getActionMap().put(name + "µ", 
                    new AbstractAction(){
                        public void actionPerformed(ActionEvent e) {
                            isRepeated = false;
                        }
                    });
        }
        

    }