Blitz (360/459)

From:David McMinn
Date:24 Jan 2000 at 16:11:39
Subject:Re: Fake mouse and keyboard

Hi Evan

Whaaaaaat? Touch screen? The electronics master returns :)

> Now, the idea was to use my own program without mouse or
> keyboard, but it would be quite nice to use other programs as well -
> all I need to do is make a "keyboard" pop up on the bottom of the
> screen whenever an input gadget is selected. In my own program, it
> was easy to do, but I haven't a clue how to go about intercepting the
> IDCMP code or whatever before it gets acted upon by the program with
> the gadget in it! And then it's got to fake the keypresses as the
> user "types".

> Any idea anyone? It struck me as a bit OS-ish, so I stopped
> thinking about it :)

Got to love the OS. Same as Kai's request the other week, as far as
sending keypresses to the program is concerned (I think). As for
grabbing the mouse clicks when over string gadgets etc (thats what
you meant?) dunno. You could probably use a global edit hook
(complicated) and that might not work properly if you use it on MUI
and other crappy GUI things that don't use gadtools.

Or, you could do something incredibly sneaky, like the MonIDCMP
program does. You tell it to monitor a window (by title) and then it
takes a copy of that window's IDCMP port and replaces it by its own
message port. So all the IDCMP messages go to MonIDCMP's message port
first, where it can do whatever it wants. It then passes them on to
the window. So instead of passing them on, you'd probably want to
change them to keypress events.



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@satanicdreams.com
http://members.xoom.com/David_McMinn | ICQ=16827694
Debugging? Klingons do not debug. Our software does not coddle the weak.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie