TDBMask Control > TDBMask Control and Object References > TDBMask Key Object Properties |
The Key:controls object property is used to determine the shortcut keys to use in the control. Also, keys can be combined using the shift status keys. The following table describes the shortcut keys that can be used in the TDBMask control:
Keys |
Key Description |
---|---|
Enter |
{Enter} |
Escape |
{Escape} |
Space |
{Space} |
Help |
{Help} |
Up |
{Up} |
Down |
{Down} |
A – Z |
{A} – {Z} |
F1 – F12 |
{F1} – {F12} |
Combination Keys |
Key Description |
---|---|
Ctrl |
^ |
Shift |
+ |
Ctrl + Shift |
^+ |
A maximum of five keys can be set in the shortcut key property. When setting multiple keys, use a comma (“,”) as a delimiter.
Example Title |
Copy Code
|
---|---|
TDBMask.Key.Clear = "^{F3}"
|
In this example, the contents in the control will be cleared when [CTRL]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBMask.Key.Clear = "^+{F3}"
|
In this example, the contents in the control will be cleared when [CTRL]+[Shift]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBMask.Key.Clear = "{F2}, ^{F3}"
|
In this example, the contents in the control will be cleared when [F2] or [CTRL]+[F3] is pressed.
There are keys that are used by Windows, such as [F10], and so on, which will not function as the user may expect if assigned to the control. The following table is the list of these keys or combination keys:
Keys |
Key Description |
---|---|
F1 |
Start up Windows help. |
F10 |
Menu. |
Help |
Start up Windows help. |
Shift+F1 |
Show What’s this. |
Shift+F10 |
Popup the context menu. |
Ctrl+Shift+Esc |
Start up WindowsNT Task Manager (NT only). |
Ctrl+Esc |
Start up the Start Menu. |
There are also keys that are used by the control, such as the SPACE key, for particular features. These keys will be overridden if assigned to the control using the Key object. The following table describes these keys:
Keys |
Key Description |
Up |
Move to the previous character. |
Down |
Move to the next character. |
A-Z |
Characters A – Z. |
Shift+A – Shift+Z |
Upper or lower case characters A-Z, a-z. |
Space |
Space character. |
Ctrl+C |
Copy text. |
Ctrl+X |
Cut text. |
Ctrl+V |
Paste text. |
Ctrl+A |
Select all text. |
Ctrl+Z |
Cancel all entry and restore text, cursor position and highlight settings. |
If you assign the ENTER or the ESC key when a default or a cancel button is placed on a form, the ENTER and the ESC key within the control will be processed first before firing the Click event of the buttons.
The properties in the Key object must be defined with unique keys with the exception of NextCtrl and NextField, PrevCtrl and PrevField sets of combination properties. These property exceptions work in the following matter:
When assigned with the same keys, the control determines whether to move to the next/previous control or the next/previous field, by referring to the current position of the caret. If the current position is placed within the first/last field, the focus will move to the next/previous control. Otherwise, the caret moves to the next/previous field.
Note: When the control is set to the free format entry, all text will be treated as one field. Therefore, the NextField and PrevField properties will not have any effect. |
All printable characters that are assigned to the Key object properties will be overridden; the assigned task will be performed when the key is pressed, instead of the key's character being entered into the control.
All of the properties for the Key object are listed in the following reference section: