Mouse: active_events

active_events
  • Returns a list of the active mouse events in this frame.

Return Type:

  • list [event, state]

event:

  • Type:  integer
  • Left button = 189
  • Middle Button = 190
  • Right Button = 191
  • Wheel Up = 193
  • Wheel Down = 194
  • Movement = 195, 196

state:

  • Type:  integer
     
  • 0 = not active
     
  • 1 = just pressed
     
  • 2 = active
     
  • 3 = released
Note:
  • bge.logic.mouse.active_events does not use the Mouse Sensor.
Sample Code

################## get a list of the active mouse events

# import bge
import bge

# get the mouse
my_mouse = bge.logic.mouse

# get a list of the active mouse events
mouseEvents = my_mouse.active_events