Sent when the user presses the key combination equivalent to the "Undo" menu item.
# Metadata
Platforms: desktop OS: mac, windows, linux Introduced: 1.0 Security:
# Syntax
undoKey
# Examples
on undoKey if the optionKey is down then revert -- to last saved version else pass undoKey end undoKey
# Description
Handle the undoKey message if you want to change the normal Undo process, or prevent use of the Undo keyboard equivalent without changing the menu.
The LiveCode development environment traps the undoKey message, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the undoKey message is not received by a stack if it's running in the development environment.
The undoKey message is sent when the user presses Command-Z (on Mac OS), Control-Z (on Windows), Alt-Backspace (on Unix), or the keyboard Undo key.
The message is sent to the active (focused) control, or to the current card if no control is focused.
# Tags
ui,
# See
- **message:** cutKey, copyKey - **command:** undo - **object:** stack - **glossary:** menu item, key combination, Windows, development environment, message, menu, Mac OS, Unix, keyboard equivalent