The undo operation (Ctrl-Z) will undo most mouse and keyboard operations, Operations that will not be undone, are those:
You can undo the last 32 operations. There is also a Redo mechanism, where the last undone operations can be redone.