INPUTE and INPUTN Notify Events
The INPUTE and INPUTN controls can generate two types of Notify events:
-
Keypress Notify events indicate when users press special keys.
-
Error Code Notify events list errors generated by the INPUTE and INPUTN controls.
INPUTE and INPUTN Notify Event Codes and Templates
The following Notify event codes and templates apply to INPUTE and INPUTN controls:
Code |
Notice Template |
Event Description |
1 |
context:u(2),code:i(1), id:u(2),objtype:i(2), key:u(2) |
Keypress Notify event. The Keypress Notify event-generating keys are identical to those returned in the keypress event ("t"). |
2 |
context:u(2),code:i(1), id:u(2),objtype:i(2), error:u(2) |
Error Code Notify event. An error occurred either by specifying a invalid mask, a invalid length, or invalid restore text. An error can also be generated by several SENDMSG() functions. See the individual function for the error description. |
Keypress Notify Event Special Keys and Returned Values
The following table lists each special key that can generate the Keypress Notify event in the INPUTN, INPUTE, and edit controls and its corresponding returned value. The values are stored in the key field of the Keypress Notify event template.
Key |
Hexadecimal Key Value |
Key |
Hexadecimal Key Value |
Tab |
$0009$ |
Keypad 7 |
$0145$ |
Esc |
$001B$ |
Keypad 8 |
$0146$ |
Delete |
$007F$ |
Keypad 9 |
$0147$ |
Up Arrow |
$012D$ |
F1 |
$014B$ |
Down Arrow |
$012E$ |
F2 |
$014C$ |
Right Arrow |
$012F$ |
F3 |
$014D$ |
Left Arrow |
$0130$ |
F4 |
$014E$ |
Page Up |
$0131$ |
F5 |
$014F$ |
Page Down |
$0132$ |
F6 |
$0150$ |
Home |
$0133$ |
F7 |
$0151$ |
End |
$0134$ |
F8 |
$0152$ |
Back Tab |
$013B$ |
F9 |
$0153$ |
Keypad 0 |
$013E$ |
F10 |
$0154$ |
Keypad 1 |
$013F$ |
F11 |
$0155$ |
Keypad 2 |
$0140$ |
F12 |
$0156$ |
Keypad 3 |
$0141$ |
Keypad * |
$0174$ |
Keypad 4 |
$0142$ |
Keypad - |
$0175$ |
Keypad 5 |
$0143$ |
Keypad + |
$0176$ |
Keypad 6 |
$0144$ |
Keypad / |
$0177$ |
Key Combination Values
The following values added to the key codes indicates if the Shift, Alt, and Ctrl keys were pressed when the Keypress Notify event was issued:
Value |
Key/Key Combination |
Value |
Key/Key Combination |
$1000$ |
Shift |
$5000$ |
Shift + Alt |
$2000$ |
Ctrl |
$6000$ |
Ctrl+ Alt |
$3000$ |
Shift + Ctrl |
$7000$ |
Shift + Ctrl + Alt |
$4000$ |
Alt |
|
|
Error Codes
The following lists the errors generated by the INPUTE and INPUTN controls:
Error Code |
Possible Cause(s) |
16 |
The SENDMSG() function was issued to retrieve the restore string, but the destination buffer in Visual PRO/5 was too small. This indicates a start size that is not large enough for the application. |
17 |
The SENDMSG() function was issued to set the position of the caret, but the position was not within the valid range of positions for the text in the control. |
41 |
The SENDMSG() function was issued to set the length of the INPUTE or INPUTN buffer, greater than 256 characters. |
43 |
The user executed the restore command. However, the restore string was invalid for the control's output mask. The high bit will be set. |
Errors that result from user action set the high bit in the Error Code Notify event error value. (The high bit is the first bit in the ERROR field in the Notice string returned by the NOTICE() function.) At this time, the only user action that can cause an error is pasting text from the clipboard by using either the Ctrl+V or Shift+Insert key combinations.