Name: pasteKey

Type: message

Syntax: pasteKey

Summary:
Sent when the user presses the <key combination> equivalent to the
"Paste" <menu item>.

Associations: card, field

Introduced: 1.0

OS: mac, windows, linux

Platforms: desktop, server

Example:
on pasteKey -- replace returns with spaces before pasting
   if the clipboardData["text"] is not empty then 
      set the clipboardData["text"] to \
            replaceText(the clipboardData["text"],return,space)
   end if
   paste
end pasteKey

Description:
Handle the <pasteKey> <message> if you want to change the normal pasting
process, or prevent use of the Paste <keyboard equivalent> without
changing the <menu>.

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

The <pasteKey> <message> is sent when the user presses Command-V (on
<Mac OS|Mac OS systems>), Control-V (on <Windows|Windows systems>),
Shift-Insert (on <Unix|Unix systems>), or the keyboard Paste key.

References: menu item (glossary), key combination (glossary),
Windows (glossary), development environment (glossary),
message (glossary), menu (glossary), Mac OS (glossary), Unix (glossary),
keyboard equivalent (glossary), cutKey (message), copyKey (message),
stack (object)

Tags: ui

