Undo/Redo in dialogs

 From:  ttype (STRUBE)
7286.4 In reply to 7286.2 
I've appended this, your example and added just the first line at the beginning of the script inside the body, hoping that that would change MoI's event policy. But either nothing happens or the script console is not opening at all and MoI crashes afterwards on closing.

Codemirror, which I use, btw has its' own undo/redo functionality that works when I assign a shortcut key that is not used by MoI.

code:
moi.command.registerCommandSpecificShortcutKey( "Ctrl+Z" );
while(1) {
    moi.ui.commandDialog.waitForEvent();
    e  = moi.ui.commandDialog.event;
    if ( e == 'Ctrl+Z' ) {
        editor.undo();
    }
}