PRB: INKEY() May Return Same ASCII Values for Different KeysLast reviewed: October 25, 1995Article ID: Q138558 |
The information in this article applies to:
SYMPTOMSUsing INKEY() to trap for a keystroke can sometimes lead to unexpected results. For example, INKEY() will return the same value, 19, for the LEFT ARROW key and ALT+R. This effect may be altered by using the following command before using the INKEY():
SET COMPATIBLE DB4 RESOLUTIONUse the SET COMPATIBLE DB4 command immediately before you use the INKEY() function. Then use the SET COMPATIBLE OFF command after using INKEY(). This may have side effects. Please see SET COMPATIBLE DB4 in the Help file.
STATUSThis behavior is by design.
MORE INFORMATIONCertain commands and functions in FoxPro, including INKEY(), behave differently depending on the SET COMPATIBLE setting. For more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q114752 TITLE : Commands and Functions Affected by SET COMPATIBLE Step-by-Step ResolutionUsing INKEY(0,'M') to trap for a key or mouse click, you can distinguish which key was pressed by using the following loop example.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |