Re: Detecting Function Key Press in 4GL
Posted in 1994
ebrad@eckhart.scd.ucar.edu (Eddie Bradford) writes: >I have a 4GL program that needs to detect when the user has pressed the "F3" >function key. This occurs in the BEFORE INSERT clause within an INPUT ARRAY >clause. >The F3 is the default scroll down key, and when the F3 is pressed, the screen >scrolls down properly - usually. When the number of items in the table being >scrolled is identical to the number of items in the screen record (4), the >IF clause containing the check for F3 fails. >I.E. > LET keyStroke = fgl_lastkey( ) > IF( keyStroke = fgl_keyval("f3") ) THEN > . > . > . > . > END IF Try: IF( keyStroke = fgl_keyval("nextpage") ) THEN . . . . END IF I suspect OPTIONS NEXT KEY F3 (the default) is overriding the "F3" check, which I agree should have worked. If it still doesn't work, do this: LET keyStroke = fgl_lastkey( ) ERROR keyStroke and let me know what number it's getting from fgl_lastkey(), and we'll look it up. >The code between the THEN and the END IF never executes. >I'm doing VT220 emulation, with the function keys generating what they're >supposed to ( ^[OP, ^[OQ, ^[OR, ^[OS, etc. ), and the function keys appear >to work correctly in all other circumstances. >Any ideas, or similar experiences? I have the Informix help line looking >into it, but so far no luck. >-- >_______________________________________________________________________________ >Eddie Bradford NCAR (National Center for Atmospheric Research) >ebrad@ncar.ucar.edu FL2-1040 >(303)497-8544 P.O. Box 3000, Boulder Colorado, 80307-3000