Re: Arrow keys in informix generally
Posted in 1991
Ron Lees wrote: > > I don't know whether its the 'fault' of either SCO or Informix. We have > the problem using Informix under SCO too, but we also got it when we were > using ISC rather than SCO and when we were using vi across a network. It is actually because of the user interface design, which uses ESC as a command key in itself, and also as the component of other keys, such as the cursor keys, transmitting things like <ESC>[A. Occasionally, a cursor/function key's characters can be sent to Informix in two parts, the first being <ESC>. When the first part arrives, the program has no way of knowing if it is a command key or part of a cursor/function key. It therefore waits a certain amount of time for the second part, and if none arrives assumes it is a command key. The problem arises when the waiting time is less than the delay between the first and second part. This happens particularly frequently when - auto repeat is used to move the cursor keys (common in novice users of vi, or in Informix display array etc.), because a large number of escape sequences are sent at once, and may be broken up as a result due to I/O buffering. - a network is involved, because the delay between first and second parts can be unpredictable and is usually larger than with directly connected terminals. > > Informix products have a work-around. There is an undocumented environment > variable called DBESCWT which takes a numeric value. It determines how long > to wait after an ESC is received before transmitting it. I'm unable to > recommend a suitable value but I _think_ that the value is expressed in > hundredths of a second. Try different values and see if it fixes the problem. This is just that, a work-around. It will work in particular cases as long as delays due to network or whatever do not change in the life of the system to become bigger than DBESCWT. The best solution is to do as GNU Emacs does and avoid using <ESC> as a command key. I'm not sure if this is possible in current versions of Informix or not, but it is in other 4GLs and is the best option. Also, I'm not sure if this will cause Informix to wait as long as needed if only an ESC is received. Maybe someone else can confirm this. If you want your users to be able to press the ESC key, and you have a customisable keyboard (e.g. via a PC terminal emulator), you can re-program the ESC key to send a distinct Escape sequence that is not used by any other keys, which will provide the users with the same interface but remove the problem. Richard =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Donkin Hoskyns Open Systems Division Internet: richardd@inset.co.uk 190 City Road, LONDON EC1V 2QH UUCP: ...!mcsun!ukc!inset!richardd United Kingdom Fax: +44 71 251 2853 Tel: +44 71 251 2128