Livecode Wiki
m (1 revision)
(Adding categories)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sent to the active [[object(glossary)]] when there is no text [[selection]] and the user presses the Return key.Syntax:
+
A Message sent to the active [[object(glossary)|object]] when there is no text [[selection]] and the user presses the Return key. If there is a message handler by the same name in the message path, then it will be executed.
  +
  +
== Message ==
  +
Syntax:
 
returnKey
 
returnKey
   
 
The Return key (confusingly labeled "Enter" on some keyboards) is usually located above the right-hand Shift key. It is the key you press to go to a new line.
  +
  +
The message is sent to the active (focused) control, or to the current card if no control is focused. If there is a text selection or insertion point in a field (or a button whose menuMode is "comboBox" ) and the user presses Return, the [[returnInField]] [[message]] is sent instead of [[returnKey]].
  +
  +
== Message handler ==
 
Examples:
 
Examples:
 
on returnKey -- go to the next card when the user presses return
 
on returnKey -- go to the next card when the user presses return
Line 7: Line 15:
 
end returnKey
 
end returnKey
   
Handle the [[returnKey]] [[message]] when you want to perform an action when
+
Use the [[returnKey]] Message handler to perform an action when the user presses Return.
the user presses Return.
 
 
The Return key (confusingly labeled "Enter" on some keyboards) is
 
usually located above the right-hand Shift key. It is the key you press
 
to go to a new line.
 
 
The message is sent to the active (focused) control, or to the current
 
card if no control is focused. If there is a text selection or insertion
 
point in a field (or a button whose menuMode is "comboBox" ) and the
 
user presses Return, the [[returnInField]] [[message]] is sent instead of
 
[[returnKey]].
 
   
See also: [[returnInField]] (message),
+
See also: [[returnInField]].[[Category: ui]]
[[Category: ui]]
+
[[Category:GUI]]
  +
[[Category:Keyboard]]

Latest revision as of 02:06, 11 July 2020

A Message sent to the active object when there is no text selection and the user presses the Return key. If there is a message handler by the same name in the message path, then it will be executed.

Message[]

Syntax:

returnKey

The Return key (confusingly labeled "Enter" on some keyboards) is usually located above the right-hand Shift key. It is the key you press to go to a new line.

The message is sent to the active (focused) control, or to the current card if no control is focused. If there is a text selection or insertion point in a field (or a button whose menuMode is "comboBox" ) and the user presses Return, the returnInField message is sent instead of returnKey.

Message handler[]

Examples:

on returnKey -- go to the next card when the user presses return
  go next card
end returnKey

Use the returnKey Message handler to perform an action when the user presses Return.

See also: returnInField.