Kent Miller (blastarr++at++ix.netcom.com)
Wed, 5 Jul 1995 19:30:50 -0700
Sorry, all my code is at work, and they don't let us take mag media out
of the facility. Here's how I went about integrating a Spaceball into
my app:
- look at the code in /usr/src/Performer/src/lib/pfutil/input.[ch]
It's pretty straightforward, and you'll feel better once you're
familiar with it.
- queue the spaceball device events (see device.h for SB events)
- register your spaceball input handler with pfuAddInputHandler, and
use the PFU_CATCH_UNKNOWN parameter so normal keyboard and mouse
events get handled first.
- you can ignore the custom event struct that gets passed to your
handler, since it's just used by CATCH_ALL to pass events back to
the pfu calling routine.
- treat the dev and val args like normal GL events.
Keypad input is easier. Just queue the keys you're interested in, and
the rest is just like the spaceball.
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:39 PDT