[comp.sys.amiga.tech] reading mouse position with console.device

finkel@TAURUS.BITNET (08/08/88)

Hi!

I'm trying to get some mouse events using console.device, and I've been
running into problems.

I asked for raw events 2,4,11,12 ( <CSI>2;4;11;12{ ), and successfully
received 2,11,12 . However, I managed only to get the button status, but
not the mouse position. I am trying to trap mouse click and to get the x,y
position, so that I could move the console.device cursor using the mouse, and
not only the cursor keys. I didn't get any raw event #4, and I am not even sure
I know what it is supposed to do. I was hoping to find the x,y location
in the x,y variables in event #2, but instead found 0,0 most of the time, and
a small signed value when I pressed the mouse button while moving it fast.

any help?

-------------------------------------------------------------------------------
Udi Finkelstein       | Bitnet:   finkel@taurus.bitnet or finkel@math.tau.ac.il
Tel Aviv University   | Internet: finkel%taurus.bitnet@cunyvm.cuny.edu
Israel                | UUCP:     ...!psuvax1!taurus.bitnet!finkel
-------------------------------------------------------------------------------

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (08/11/88)

In article <8808072043.AA19006@MATH.Tau.Ac.IL> <finkel%TAURUS.BITNET@CUNYVM.CUNY.EDU> writes:
>Hi!
>
>I'm trying to get some mouse events using console.device, and I've been
>running into problems.

I've never messed with getting stuff that way, so...

I suggest that instead you get mouse XY position from your Window or
IDCMP, and cursor position, etc, from your ConUnit structure.

If you are in a CON: window, send an ACTION_DISK_INFO packet to get
pointers to the window and the ConUnit.

See my previous posting (last week ?) all about ConUnit and packets to
console, etc. 
-- 
==========================================================================
  Carolyn Scheppner -- CATS  Commodore Amiga Technical Support
  PHONE 215-431-9180   UUCP  ...{uunet,allegra,rutgers}!cbmvax!carolyn 

 !!! SAVE THE RADS !!! 
==========================================================================

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (08/11/88)

In article <8808072043.AA19006@MATH.Tau.Ac.IL> <finkel%TAURUS.BITNET@CUNYVM.CUNY.EDU> writes:
>Hi!
>[]
>I know what it is supposed to do. I was hoping to find the x,y location
>in the x,y variables in event #2, but instead found 0,0 most of the time, and
>a small signed value when I pressed the mouse button while moving it fast.

Just a thought - I think you may be getting RELATIVE mouse position
events.  I think most system mouse events are relative.

Think about my previous suggestion.  (Or next suggestion, as the case may
be, if uucp is in a playful mode)
-- 
==========================================================================
  Carolyn Scheppner -- CATS  Commodore Amiga Technical Support
  PHONE 215-431-9180   UUCP  ...{uunet,allegra,rutgers}!cbmvax!carolyn 

 Oh I'm a numberjack and I'm OK, I code all night and I work all day...
==========================================================================