[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to handle keyboard inputy



On Thu, 27 Apr 2000, Keith Lucas wrote:

> > Suggestions appreciated.
> > 
> 
> 
> I do it like this:
> 
> KeyboardFunc and SpecialFunc and so on read the in they store it in a
> character buffer if it's a typeable character and it's a "down" event
> and also in a keymap, so they keymap has the state of all the
> buttons. I put all the mouse buttons and stuff in there as
> well. Likewise the state holds the mouse positions and a little state
> machine that knows what the mouse is doing ( moving, dragging,
> clicking etc).
> 
> During the "idle" event I just read the state out. It means that the
> idle one is the only one with any real processing happening in it, and
> when it's called it's got a nice consistent state view of the keyboard
> and mouse.

So, you sort of translate the stuff from glut into your own format and
handle these?

But, that way you can not handle concurrent key presses, correct?

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
The Microsoft Dictionary

           multi-platform: Works with both Windows NT Workstation and
                           Windows 2000 Professional.


---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk