Re: Function Keys and Input
Posted in 1997
Michael Hoffman wrote: > > Hello again All, > > {Vital System Info: HP 9000/896 w/ HP-UX 10.01; Informix 5.04; I4gl 4.13} > > I don't remember this ever happening before, so it may be a terminal > emulation problem, but it could also be that I never actually ran exactly this > type of function before, or never hit the wrong keys. > > The Problem: I have a standard "input .... without defaults". I > have several "before field" and "after field" statements, along with "before > input" and "after input". I also have ONE "On Key (F2)" clause which, based > on the "infield()" results, calls different functions for extended input and > "pop-up" windows. > We have just noticed (due to someone thinking F7 was F2!) that all > the Function Keys above F6 pass code to the screen and even try to Accept the > data! The F6 Key passes an <ESC> and the code "[17~" to the screen. The > program runs through the "after input" clause and if there is a problem, puts > the user in the incorrect field (like it should), but slugs in that "[17~" > value. > {F7 thru F12 do the same thing, except the number increases by 1 for each key} > > Since I am not using any other function keys than F2, and I have not > declared them anywhere using "Options", shouldn't Informix just ignore them? > > The only solution I can come up with is to declare "On Key" for all > unused Function Keys with, maybe, error messages popping up saying "This key > is invalid". > > There HAS to be a better way! > > Thanks, > Michael As the other replies said, check if the function keys are defined (and are defined to what the terminal is sending - the terminal may have been reprogrammed or the termcap may have been hacked). If the keys are defined try echo $DBESCWAIT If DBESCWAIT is not defined or is 0, set it to 1. If it's 1, set it to 2. Ian