[net.micro.amiga] A question about kbd input to AmigaBasic

cosell@BBN-PROPHET.ARPA@caip.RUTGERS.EDU (01/31/86)

From: Bernie Cosell <cosell@BBN-PROPHET.ARPA>

If any of you folk are sufficient AmigaBasic wizards to help me with this one,
I'd appreciate it:

I'm trying to write a slightly fancy little program in AmigaBasic and I'm
having trouble getting the mouse and keyboard to cooperate.  What I have
is several windows around on the screen for different things, and while
I can use "WINDOW OUTPUT n" to correct get my output sorted out properly,
I can't get input to cooperate.  As far as I can tell:
    a) keyboard input goes to the last window that you did a real
       "WINDOW n" to create, until you click the mouse once, at which point
       keyboard input goes to whichever window you clicked in last.
    b) The coordinates returned in the MOUSE(n) functions are always relative
       to the last window you created with "WINDOW n", regardless of what
       window the mouse is actually in.

If these are true, is there some way to finess them?  (a) makes it awfully
hard to have two windows, one for text and one for pointing/drawing.
(b) is a problem because everything above or to the left of the last window
you created turns up with a '0' coordinate for the mouse click (I could
handle it if it gave me *negative*, but accurate, coordinates: I could just
relocate them myself).

Any advice or finesses or the like would be greatly appreciated (even some
magic way to use a direct-AmigaDOS-library call to get things sorted out).

Much thanks!!
  /Bernie