SET PCKEYS

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Translate function key codes to PC equivalents.


Syntax

SET PCKEYS ON | OFF | (<expL>)


See Also

APPEND, CHANGE, CREATE SCREEN, DB_FOXPLUSBUGS, DB_FOXPROKEYS, DB_SAMBA, EDIT, EDITFIELD(), FILETYPE(), FMT(), Function Keys, INDEXEXT(), INKEY(), LASTKEY(), MODIFY SCREEN, READKEY(), SET CLIPPER, SET CLIPPER5, SET COMPATIBLE, SET EDITFIELD, SET FILECASE, SET FILETYPE, SET FORMAT, SET INDEXEXT, SET MEMOEXT, SET PCEDIT, SET PCEXACT, SET PCFILTER, SET PCGRAPHICS, SET PCLOCKING, SET PCPICTURE, SET PCSAYS, SET PCUNIQUE, WAIT


Description

The SET PCKEYS ON command causes the INKEY(), READKEY() and LASTKEY() functions, and the WAIT command, to translate the codes for function keys pressed at the keyboard to their IBM-PC counterparts. A table summarizing the codes is shown below.


Keypad List PC Key Wait Inkey() Readkey() Lastkey()
[1] F1 0 28 36 28
[2] F2 255 -1 -1
[3] F3 254 -2 -2
[4] F4 253 -3 -3
[5] F5 253 -4 -4
[6] F6 251 -5 -5
[7] F7 250 -6 -6
[8] F8 249 -7 -7
[9] F9 248 -8 -8
[0] F10 247 -9 -9
[CURSOR LEFT] CURSOR LEFT 19 19 0 19
[CURSOR RIGHT] CURSOR RIGHT 4 4 1 4
[CURSOR UP] CURSOR UP 5 5 4 5
[CURSOR DOWN] CURSOR DOWN 24 24 5 24
[PAGE UP] PgUp 18 18 6 18
[PAGE DOWN] PgDn 3 3 7 3
[ABANDON] Esc 27 27 12 27
[EXIT/SAVE] End 23 23 14 23
[PAN LEFT] Ctrl <- 26 26 8 26
[PAN RIGHT] Ctrl -> 2 2 9 2


When PCKEYS is ON the ’/’ key cannot be used to activate the menu bar. The [MENUBAR] key must be used instead. This allows the ’/’ to be input into a field on a form.

This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned PCKEYS is set ON. If a value of .F. is returned PCKEYS is set OFF. By default SET PCKEYS is OFF.


Example

set pckeys on
? inkey(0)
// Press key to obtain value


Products

Recital