No luck with pfuInputHandler ?

New Message Reply Date view Thread view Subject view Author view

Brad Colbert (bcolbert++at++coralsea.ait.nrl.navy.mil)
Mon, 10 Feb 1997 19:07:05 -0500


   Hi folks,

   I'm trying to capture X key events using pfuInputHandler to no avail.
   My handler function is called on a key event but I am unable to decode
   which key was pressed.

   The man page is a bit vague...

     pfuInputHandler installs the custom handler userFunc, which will then be
     called to process each input event included in mask. If the mode is
     PFUINPUT_X, then mask can be set to the bitwise-or of an X input mask
     with PFUINPUT_CATCH_UNKNOWN, PFUINPUT_CATCH_SIM, or PFU_CATCH_ALL. If
     mode is PFUINPUT_GL, then mask may be set to either PFU_CATCH_ALL or
     PFU_CATCH_UNKNOWN.

   Which X input masks? The ones defined in X.h? Also there is an error
   in this man page segment. PFU_CATCH_ALL should be PFUINPUT_CATCH_ALL.

   Does anyone have any information on how to use pfuInputHandler ?

   Here is how my pfuInputHandler is defined and the format of my input
   handler...

int setupKeyboardInput (pfPipeWindow *thePw)
{
   events = new pfuEventStream;

   if (!events) // if events was not created for some reason
      return FALSE;

   pfuInitInput (thePw, PFUINPUT_X);

   pfuInputHandler (processKeyboardInput, PFUINPUT_CATCH_SIM | KeyReleaseMask);

   return TRUE;
}

pfuEventHandlerFuncType *processKeyboardInput (int dev, void *val,
                                              pfuCustomEvent *pfuevent)
{
   ...
}

   Any help would be greatly appreciated.

   Brad

-- 
-| How I want a break, Caribbean of course, after the heavy lectures involving 
-| quantum mechanics. All of thy geometry, Herr Planck, is fairly hard...
-+-----------------------------------------------------------------------------
-| bcolbert++at++ait.nrl.navy.mil    (202) 404-4708    ITD Virtual Reality Lab, NRL
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:37 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.