ENTER

From Director Online Wiki
Jump to: navigation, search

A Lingo predefined constant that is exactly equal to the string obtained by running numToChar( 3 ). This is the ASCII character sent when the RETURN key is pressed on the Macintosh, or the keypad ENTER key is pressed on the PC.

Sometimes the key value for the enter key is not equal to the ENTER constant, but the RETURN constant instead. This is true of the main enter key on Windows and for the enter key on the Mac when running as an applet.

To safely check for the enter key being pressed on any platform, use something similar to the following example:

 on keyDown
   if( the key = ENTER ) OR ( the key = RETURN ) then
     -- enter was pressed
   end if
 end

See Also:

RETURN