Module pyglet.window.mouse

Mouse constants and utilities for pyglet.window.

Functions

str buttons_string(buttons)
Return a string describing a set of active mouse buttons.

Constants

  LEFT = 1
  MIDDLE = 2
  RIGHT = 4

Variables

  __package__ = None

Function Details

buttons_string

buttons_string(buttons)

Return a string describing a set of active mouse buttons.

Example:

>>> buttons_string(LEFT | RIGHT)
'LEFT|RIGHT'
Parameters:
buttons : int
Bitwise combination of mouse button constants.
Returns: str