Disable enter & escape keys

Command group Flag affected Reversible Execute on client Platform(s)
Enter data NO YES NO All

Syntax

Disable enter & escape keys

Description

This command disables the Enter key on all platforms; on Windows and Linux, it also disables the Escape key, whereas on macOS it also disables the Escape key and Cmnd-period. In other words, it disables the keyboard equivalents of the OK and Cancel pushbuttons. For example, you can use it during enter data mode to prevent the user from prematurely updating records by hitting the Enter key, when they attempt to start a new line. The option will remain set until either it is reversed with an Enable command, a new library is selected, or it is reversed as part of a reversible block.

Before using this command in a method that initiates an Enter data command, ensure that the user has some way of ending data entry, that is, by installing an OK and a Cancel pushbutton, or by using a $control() method that detects the end of data entry.

Example

# $construct of window class
Begin reversible block
  Disable enter & escape keys
End reversible block
Enter data
If flag true
  OK message {OK Button Pressed}
End If