Undo is an interaction technique which is implemented in many computer programs. It erases the last change done to the document reverting it to an older state. In some more advanced programs such as graphic processing, undo will negate the last command done to the file being edited. With the possibility of undo, users can explore and work with the programs without fear of making mistakes because they can easily be undone.
So the expectations for undo are to be easy to understand, to have a predictable functionality and to include all undoable commands.
Usually undo is always available until the user undoes all executed operations. But there are some actions which are not stored in the undo list and so there is no possibility to undo these. For example, saving file is not undoable, but is queued in the list to show that this command was executed. Another action, which is not undoable, and also not stored, is scrolling or selection.
The opposite of undo is redo. The redo command reverses the undo or advances the buffer to a more current state.
The usual common parts of the undo functionality are the commands, which were executed of the user, the history buffer(s), which store the completed actions, the undo/redo manager for controlling the history buffer and the user interface for interacting with the user.
In most Windows applications, the Undo command is activated by pressing the Ctrl+Z or Alt+Backspace keybindings.
In all Macintosh applications, the Undo command is activated by pressing Command-Z. The common command for Redo on Microsoft Windows systems is Ctrl+Y or Ctrl+Shift+Z.
The common command for Redo on Apple Macintosh systems is Command-Shift-Z.