Re: Re: Getting last key pressed in 4GL
Posted in 1994
Hi, netters! } Michel Behna (mbehna@promus.com) wrote: } Look at fgl_lastkey() function. I know it was undocumented and if you need the As far as I undestand, fgl_lastkey() function is useful within CONSTRUCT or INPUT statements only. So, that's the reason Dirch's program below doesn't work. Am i right? } I have tried this hint, but it doesnt work. I have written a short program } shown below: } } -------------------------------------------------------------------------- } main } } defer interrupt } let int_flag = 0 } while true } call show_key( fgl_lastkey() ) } } if int_flag != 0 then } display "Aborted with DeleteChar!!!" } exit while } end if } end while } } end main } } function show_key( keyvalue ) } define keyvalue integer } } if keyvalue != 0 then > case } when keyvalue = fgl_keyval("f1") } display "Key F1 pressed..." } when keyvalue = fgl_keyval("f2") } display "Key F2 pressed..." } otherwise } display "Key ", keyvalue," pressed..." } end case } end if } end function } -------------------------------------------------------------------------- } } I expected to see messages when pressing any key. But all I get is the } abort-message when hitting the DeleteChar. } > Dirch Best regards. Andy. --------------------------------------------------------------- Andrew Yu. Grachyov | Phone +7 (095) 928-6078 TERN, Moscow, Russia | +7 (095) 925-1785 andy@tern.msk.su | Fax +7 (095) 280-3870