Go to the first, previous, next, last section, table of contents.

The DeviceEvent type

The range of user input and interaction is encoded in the DeviceEvent type:

data DeviceEvent
 = DevEv
     ModState	-- modifiers (Shift, Alt, Meta, Hyper, Super, Button-1 ) active
     Int Int	-- position of mouse pointer. (in local coords.)
     TimeStamp	-- time stamp (in millisecs.)
     EventType

data EventType
 = Key		 
      PressedState
      KeyValue  -- alg. type 
 | MouseButton   
      PressedState
      Int       -- which button (in X11 that could be 1-5)
   {- up&down of Button x -}
 | MouseClick
      Int	-- which button that was clicked.
 | MultiClick   
      Int	-- which button      
      Int	-- how many clicks 
 | MouseDrag	 
      Int	-- which button
      Int Int	-- drag start
 | Motion

  {- mouse ptr crossing in/out of component  -}

 | Leave
 | Enter

data PressedState
 = Down
 | Up

Go to the first, previous, next, last section, table of contents.