Re: 4GL Function Keys
Posted in 1993
> > My environment says that my terminal is ansi; INFORMIXTERM is set to termcap; > the termcap entry says F6 is ^[[R and F7 is ^[[S. My keyboard produces these > strings correctly. (If I change the termcap entry, the program behaves as if > it is receiving ^[[S when I hit F7.) It's just that hitting F7 doesn't trigger > the clear screen and menu exit. Unfortunately, hitting F6 does! Any ideas? > > The following is the function key string I use with SCO and Informix 4GL 4.1 where k0 is the F1 function key, and k9 is F10 :k0=\\E[M:k1=\\E[N:k2=\\E[O:k3=\\E[P:k4=\\E[Q:\\ :k5=\\E[R:k6=\\E[S:k7=\\E[T:k8=\\E[U:k9=\\E[V:\\ The following is a test program I user to test terminal capabilities and function keys: ----Cut----- ############################################################################# # Module: @(#)termtest.4gl 1.5 Date: 93/06/05 # Author: Lester B. Knutsen ( lester@access.digex.net) # Advanced DataTools Corporation # # A Program to test the capabilities of a terminal with Informix 4GL ############################################################################# main define ans char(1) # Test if border line graphics are displayed correctly open window test_box at 5,10 with 16 rows, 60 columns attribute ( border , prompt line last ) display "Terminal Color, Graphics and Function key Test" at 1,7 # Test color and display attributes display "Line 1 - reverse" at 2,1 attribute( reverse ) display "Line 2 - bold" at 3,1 attribute( bold ) display "Line 3 - dim" at 4,1 attribute( dim ) display "Line 4 - underline" at 5,1 attribute( underline ) display "Line 5 - white" at 6,1 attribute( white ) display "Line 6 - yellow" at 7,1 attribute( yellow ) display "Line 7 - magenta" at 8,1 attribute( magenta ) display "Line 8 - red" at 9,1 attribute( red ) display "Line 9 - cyan" at 10,1 attribute( cyan ) display "Line 10 - green" at 11,1 attribute( green ) display "Line 11 - blue" at 12,1 attribute( blue ) display "Line 12 - black" at 13,1 attribute( black ) # invsible line # Test Function keys F1 to F10 while ( true ) prompt "Press a Function Key [F1-F10] or Q to quit" for char ans on key (F1) error "F1 Function key pressed" on key (F2) error "F2 Function key pressed" on key (F3) error "F3 Function key pressed" on key (F4) error "F4 Function key pressed" on key (F5) error "F5 Function key pressed" on key (F6) error "F6 Function key pressed" on key (F7) error "F7 Function key pressed" on key (F8) error "F8 Function key pressed" on key (F9) error "F9 Function key pressed" on key (F10) error "F10 Function key pressed" end prompt if ans = "q" or ans = "Q" then exit while end if end while end main ############################################################################# # Lester Knutsen lester@access.digex.net # # Advanced DataTools Corporation Voice: 703-256-0267 # # Providing Informix Database Tools and Consulting # #############################################################################