PRB: Incorrect Keystroke Values on Wyse 50 Terminal

ID: Q122979

The information in this article applies to:

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:

Last Reviewed: February 3, 1995