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

Re: How to handle keyboard input

> The problem with missing keyups is due to the modifier
> keys changing between the keyup and keydown giving you
> a different character for the keyup and the keydown.
> Unlike the X11 version the GLUT the Windows version
> does not provide fully modified key events.  Just
> capitalization on the shift modifier.  So you don't
> get the same problem.

I tag both entries in the keymap, using tolower and toupper on the
input. That way you can ask if they 'a' key is down or if the 'A' key
is down or if the KEY_A is down.

Things like KEY_PAGEUP are set to very low ascii values.

Anyone got any neat tricks for mouse handling? I've got this state
transition thing that watches for button downs and starts a click then
watches for motions over a certain area and then starts a drag and
waits for button up and ends the thing and makes the data available,
but it seems a bit clunky at handling when the buttons involved change
through the action.

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