Re: geos-dev-digest V1 #42

CamiLee@aol.com
Wed, 17 Jul 1996 01:50:31 -0400

In a message dated 96-07-16 02:47:59 EDT, you write:

> Hello!
> This is test... but it contains some serious questions, too.
> a) How can I write a KeyboardHandler under Geos? I managed to send all
> keyboard-entry to one method (via MSG_META_KBD_CHAR) - so I can't leave
the
> app via the F3-key anymore - but pressing "a" doesn't do what it should.
> (I'm trying to write some action-games, so it is necessary to get the
> pressed keys without displaying them).
> b) What about the "VC_JOYSTICK_0",...? Is it possible to handle the
joystick
> as a keyboard?
> c) How to write screen-savers?
> Regards
> Joerg
> - - --

Hi Joerg,

As for a.), since all your characters are going to MSG_META_KBD_CHAR, if you
have no use for a certain keystroke, like "F3", you should be able to just
use MSG_META_FUP_KBD_CHAR to have the UI take the "default" action to handle
the keypress if you have no specific code making it do something else. If
you're using Gen objects, you use @callsuper(), for default behavior

For b.) there's a Joystick applet floating around right now, that looks like
it works as a joystick should on my CH FlightStick. If you have the floating
keyboard on screen, I imagine you could use the joystick as a keyboard...but
I don't suspect you'd want to use the joystick buttons, as representing
keyboard chars..although I might be wrong.

For c.) someone else will have to help you here. <grin> I haven't the
foggiest, but suspect, you'd need to dabble with system timers and
calls...somewhere I'm not yet.

Lee