Have a Question?
Print

00028: Problems loading function keys under Unix

Title:

Problems loading function keys under Unix

Description:

The first step is to verify the termcap entry is being recognized. As an example, invoke BBX and press the function key you are attempting to load. It should not return the KEY value, for instance pressing SHIFT F1 should return nothing, if you are seeing something else chances are the termcap entry for the SHIFT F1 is not being loaded. 

Here’s a few tips about TERMCAP: 

BBX will first look at the “-bb” entry (ie;ansicoe-bb), typically at the end of the entry there will be a “tc=ansiex”. This will tell BBX to look at the ansiex entry for further enhancements. A termcap line that ends in a “\” means the entry continues to the next line, an entry ending with a “:” means it is finished. Or the function key definition is being remarked out by having a “#” sign at the beginning of the line. If this is the case, remove the # sign before each line. Remember to add the “\” from the last entry above it, and remove the “\” at the end of the last line of the additions. 

Sometimes although these rules are being followed the termcap entry is still not be recognized, it may be because the entry is not contiguous. Move all the function key definitions together. See sample at the end of article. 

Now if you go back into BBX and press the SHIFT F1, nothing should happen. Now you may actually use the ‘FL’ or ‘El’ to actually load the key. Note it is 0 based so if I want to load SHIFT F1 it would be 12 if my keyboard goes up to F12, so F12 would be chr(11) and SHIFT F1 would be chr(12). 

print ‘FL’,”2″+chr(12)+chr(4)+”TEST” 

Now if you print shift F12, it should print TEST. 

Here is an example of the ansiex entry before modification: 

ansiex|ansi-ex|Ansi standard crt with modified graphics: :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%d;%dH:co#80: :dc=\E[P:dl=\E[M:bt=\E[Z:ei=:ho=\E[H:ic=\E[@:im=:li#25: :ms:pt:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m: :kh=\E[H:kb=^h:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:eo: :up=\E[A:do=\E[B:nd=\E[C:bc=\E[D: :sf=\E[S:sr=\E[T:RT=^J: :GV=\263:GH=\304:GC=\305:GU=\301:GD=\302:GL=\264:GR=\303: :G1=\277:G2=\332:G3=\300:G4=\331: :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q: :k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:k0=\E[V: :EN=\E[F:PU=\E[I:PD=\E[G: 

# extensions to ‘ansiex’ (remove comments and add to ansiex) 
# 10 function key keyboard shift values 
# :kA=\E[Y:kB=\E[Z:kC=\E[a:kD=\E[b:kE=\E[c:# :kF=\E[d:kG=\E[e:kH=\E[f:kI=\E[g:kJ=\E[h:# :lA=shift F1:lB=shift F2:lC=shift F3:lD=shift F4:lE=shift F5:# :lF=shift F6:lG=shift F7:lH=shift F8:lI=shift F9:lJ=shift F10:# 12 function key keyboard values 
# :kA=\E[W:kB=\E[X:lA=F11:lB=F12:# function key shift values 
# :kC=\E[Y:kD=\E[Z:kE=\E[a:kF=\E[b:kG=\E[c:\ ****kC is Shift F1 
# :kH=\E[d:kI=\E[e:kJ=\E[f:kK=\E[g:kL=\E[h:# :lC=shift F1:lD=shift F2:lE=shift F3:lF=shift F4:lG=shift F5:# :lH=shift F6:lI=shift F7:lJ=shift F8:lK=shift F9:lL=shift F10:# 12 function key shift values 
# :kM=\E[i:kN=\E[j:lM=shift F11:lN=shift F12: 
After modifications: 

ansiex|ansi-ex|Ansi standard crt with modified graphics: :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%d;%dH:co#80: :dc=\E[P:dl=\E[M:bt=\E[Z:ei=:ho=\E[H:ic=\E[@:im=:li#25: :ms:pt:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m: :kh=\E[H:kb=^h:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:eo: :up=\E[A:do=\E[B:nd=\E[C:bc=\E[D: :sf=\E[S:sr=\E[T:RT=^J: :GV=\263:GH=\304:GC=\305:GU=\301:GD=\302:GL=\264:GR=\303: :G1=\277:G2=\332:G3=\300:G4=\331: :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q: :k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:k0=\E[V: :EN=\E[F:PU=\E[I:PD=\E[G: :kA=\E[W:kB=\E[X:lA=F11:lB=F12: :kC=\E[Y:kD=\E[Z:kE=\E[a:kF=\E[b:kG=\E[c:\ ***kC is shift F1 
:kH=\E[d:kI=\E[e:kJ=\E[f:kK=\E[g:kL=\E[h: :lC=shift F1:lD=shift F2:lE=shift F3:lF=shift F4:lG=shift F5: :lH=shift F6:lI=shift F7:lJ=shift F8:lK=shift F9:lL=shift F10: :kM=\E[i:kN=\E[j:lM=shift F11:lN=shift F12: 

9/25/96 



Last Modified: 12/18/1997 Product: PRO/5 Operating System: Unix

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top