[fpc-pascal] Keyboard unit under Linux

Frank McCormick fmccormick at videotron.ca
Thu Oct 18 00:19:06 CEST 2007


Resending because of some changes in my results.


I am having a tough time using the keyboard unit under Linux. Please tell me
whats wrong with this code:

( var section cut out)

Begin
   InitKeyBoard;
   Repeat
     K:=pollKeyEvent;
     if k <>0
     then
     begin
       k:=getkeyevent;
       k:=translatekeyevent(k);
       if isfunctionkey(k)
       then
       case k Of
       kbdF1 :
            Begin
            End;
       kbdF3 : ;//DoSpot;
       kbdF4 : ;//DoId;
       kbdF2 :Begin
                 End;
       kbdF9 : ;//GetUpdate(PromoString,PromoPrompt);
       kbdF10 :;// GetUpdate(WeatherString,WeatherPrompt);
      end
      else  if not isfunctionkey(k)
      then
        case getkeyeventchar(k) of
        '1'..'8' :
                  Begin
                  End;
       'c':
             Begin
             End;
       'd':
             Begin
             End;
       'N','n': GetNext;
      End; {of case}
     End;
  Until quit;
End;

I have chopped out a lot of the code; The only  keys I get or those in the
getkeyeventchar section, i.e. '1'..'8' etc. 


Cheers 

Frank



--- 
    Change the world one loan at a time - visit Kiva.org to find out how
    
    
    
    
   



More information about the fpc-pascal mailing list