[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| READKEY |
+---------------------------------+
READKEY([<expN>])
-----------------------------------
Returns value corresponding to key pressed to exit from certain editing
commands, or value indicating how last READ was terminated.
Return value - Numeric
-----------------------------------
<expN>
Returns a value that indicates how last READ was terminated. The
numeric expression <expN> can assume any value.
Here are the values returned by READKEY(<expN>) with the reason why the
READ was terminated:
Value Reason
-----------------------------------
1 None of the following
2 CLEAR READ issued
3 Terminating control chosen
4 READ window closed
5 DEACTIVATE clause returned .F.
6 READ timed out
Values Returned by READKEY
Key(s) No Update Update Meaning
Code Code
-----------------------------------
Backspace
Left Arrow 0 256 Back 1
Ctrl+H char.
Ctrl+S
-----------------------------------
Right Arrow
Ctrl+D* 1 257 Forward
Ctrl+L 1 char.
-----------------------------------
Home 2 258 Back 1
Ctrl+A* word
-----------------------------------
End 3 259 Forward
Ctrl+F 1 word
-----------------------------------
Up Arrow
Ctrl+E* 4 260 Back 1
Shift+Tab field
Ctrl+K*
-----------------------------------
Down Arrow
Ctrl+X*
Tab 5 261 Forward
Ctrl+Enter 1
Ctrl+I field
Ctrl+J
-----------------------------------
PgUp 6 262 Back 1
Ctrl+R* screen
-----------------------------------
PgDn 7 263 Forward
Ctrl+C 1 screen
-----------------------------------
Ctrl+Q 12 268 Exit
Escape without
save
-----------------------------------
Ctrl+End - 270 Exit
Ctrl+W and save
-----------------------------------
Enter 15 271 Return
Ctrl+Rt Arrow or
Ctrl+M filled
-----------------------------------
Timeout 20 276 Timeout
-----------------------------------
Ctrl+Home 33 289 Toggle
Ctrl+] menu
display
-----------------------------------
Ctrl+PgUp 34 290 Zoom
Ctrl- out
-----------------------------------
Ctrl+PgDn 35 291 Zoom in
Ctrl+
-----------------------------------
F1 36 292 Help
func.
key
-----------------------------------
* If SET SYSMENU is OFF or FOXPLUS.FKY is loaded, these values are
returned. FOXPLUS.FKY is in the GOODIES directory.
+---------------------------------+
| Program Example |
+---------------------------------+
In this example, the data from the current record in CUSTOMER is placed
in an array with SCATTER. The user then edits the field data for the
current record. Press Escape at any time to cancel the changes.
READKEY() tests to see if the READ was exited by pressing Escape, and if
so, restores the original values to the data fields from the array with
GATHER.
SET TALK OFF
CLOSE ALL
USE customer
SCATTER TO temp
DEFINE WINDOW menter FROM 6,10 to 18,70 PANEL
ACTIVATE WINDOW menter
@ 1,3 SAY 'Customer: ' GET company
@ 3,3 SAY 'Address: ' GET address1
@ 5,3 SAY 'City: ' GET city
@ 7,3 SAY 'State: ' GET state
@ 7,18 SAY 'Zip: ' GET zip
@ 9,18 SAY 'Press <Escape> to cancel'
READ
IF READKEY() = 268 && Escape was pressed
GATHER FROM temp
ENDIF
DEACTIVATE WINDOW menter
DISPLAY
-----------------------------------
See Also: INKEY(), READ, VARREAD(), WREAD()
-----------------------------------
See Also:
INKEY()
READ
VARREAD()
WREAD()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson