ConMouse command



ConMouse EventCode& [,ButtonCode&]


Legacy Syntax:

MOUSE ButtonCode& [,MOVE] [,DOUBLE] [,DOWN] [,UP]


Pseudo-object Syntax:

CON.MOUSE EventCode&, ButtonCode&


Specifies the type of events which will trigger mouse reports through ConInKey$ and ConWaitKey$.


EventCode& is a combination of the following values:

 1 = Movement                 4 = Button press

 2 = DoubleClick              8 = Button release


ButtonCode& is a combination of the following values:

 0 = no button                4 = second left (center) button

 1 = left button              8 = third left button

 2 = right button            16 = fourth left button


If ConMouse is not executed, or if no valid bits are set in EventCode&, ConMouseOn does not cause any mouse events to be reported. ConMouse may be executed after ConMouseOn to specify or modify events.


If ButtonCode& is omitted or has no valid bit set, it defaults to 1 (left button) unless EventCode& bit 0 is set (movement). If EventCode& bit 0 is set, all mouse movements over the console are reported, with or without button presses.


The Windows API defines the following constants which may be used:













#IF %DEF(%PB_CC32)

  MOUSE ButtonCode&, DOWN


  ConMouse 4, ButtonCode&



The appropriate EventCode& (or combination of event code bits) must be inserted according to the final keyword(s), DOWN, UP, DOUBLE and/or MOVE. In the legacy syntax, the event keyword could be omitted, defaulting to DOWN. For ConMouse, a valid EventCode& must be given (the ButtonCode& may be omitted, defaulting to 1, left button, if EventCode& specifies a button event)


#IF %DEF(%PB_CC32)

  CON.MOUSE EventCode&, ButtonCode&


  ConMouse EventCode&, ButtonCode&



Notice that the order of the parameters has effectively been reversed between the legacy syntax and the pseudo-object syntax. ConMouse uses the pseudo-object parameter ordering.


See Also: ConMouseOn, ConMouseOff, ConInKey$, ConWaitKey$