Mouse: events

events
  • Returns a list of all of the mouse events

Return Type:
  • list [event, state]

event:
  • 188 =
     
  • 189 =
     
  • 190 = Left Mouse Button
     
  • 191 = Middle Mouse Button
     
  • 192 = Right Mouse Button
     
  • 193 =
     
  • 194 = Wheel Up
     
  • 195 = Wheel Down
     
  • 196 = Mouse Movement x-axis (screen)
     
  • 197 = Mouse Movement y-axis (screen)
     
  • 198 =
state:
  • 0 = not active
     
  • 1 = just pressed
     
  • 2 = active
     
  • 3 = released
Note:
  • bge.logic.mouse.events does not use the Mouse Sensor.
Sample Code

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

# import bge
import bge

# get the mouse
my_mouse = bge.logic.mouse

# get a list of all of the mouse events
events_List = my_mouse.events