copyKey

Sent when the user presses the key combination equivalent to the Copy menu item.

# Metadata

Platforms: desktop, server OS: mac, windows, linux Introduced: 1.0 Security:

# Syntax

copyKey

# Examples

on copyKey if the selection is empty then beep -- nothing to copy pass copyKey end copyKey

# Description

Handle the copyKey message if you want to change the normal copying process, or prevent use of the Copy key combination without changing the menu.

The LiveCode development environment traps the copyKey message, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the copyKey message is not received by a stack if it's running in the development environment.

The copyKey message is sent when the user presses Command-C (on Mac OS), Control-C (on Windows), Control-Insert (on Unix), or the keyboard Copy key.

The message is sent to the active (focused) control, or to the current card if no control is focused.

# Tags

ui,

# See

- **message:** pasteKey, cutKey, undoKey - **command:** copy - **object:** stack - **glossary:** menu item, key combination, Windows, development environment, message, Mac OS, Unix