PRB: Incorrect Keystroke Values on Wyse 50 Terminal

Last reviewed: February 3, 1995
Article ID: Q122979
The information in this article applies to:
  • Microsoft FoxPro for UNIX, version 2.6

SYMPTOMS

Some keystroke values returned from INKEY() or READKEY() may have incorrect values on a Wyse 50 terminal.

CAUSE

The Wyse 50 is not detecting a status change on the terminal and does not reset the terminal type correctly.

NOTE: The Wyse 50 terminal is manufactured by a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability.

RESOLUTION

To resolve this problem on a Wyse 50, do the following every time after the user logs into the terminal:

  1. Set the TERM environment variable to wy50fox. For more information on setting environment variables, please see the following article in the Microsoft Knowledge Base:

    ARTICLE-ID:Q118913

       TITLE     :How to Set the FOXTERM Environment Variable
    
       However, use TERM, not FOXTERM.
    
    

  2. After TERM has been set to wy50fox, physically turn off the terminal. Then turn it back on.

  3. Run FoxPro with either the INKEY or READKEY programs. Keystrokes should now be correct for the current login session.

MORE INFORMATION

When using a TERM environment variable value of wy50 or wy50fox (which ships for FoxPro for UNIX), it is possible for READKEY() and INKEY() to return incorrect values for the Down and Left arrow keys. Outlined below is a table with correct and possible incorrect values for arrow keys:

                                    Possible Incorrect Values
Keystroke            Correct        Returned from INKEY/READKEY

Down arrow              24                     10
Up arrow                 5                      5
Right arrow              4                      4
Left arrow              19                    127


Additional reference words: FoxUnix 2.60
KBCategory: kbhw kbenv kb3rdparty kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.