Skip to content

Instantly share code, notes, and snippets.

@pepijndevos
Created April 9, 2010 13:54
Show Gist options
  • Save pepijndevos/361179 to your computer and use it in GitHub Desktop.
Save pepijndevos/361179 to your computer and use it in GitHub Desktop.
from pymouse import PyMouseEvent
class event(PyMouseEvent):
def move(self, x, y):
print "Mouse moved to", x, y
def click(self, x, y, button, press):
if press:
print "Mouse pressed at", x, y, "with button", button
else:
print "Mouse released at", x, y, "with button", button
e = event()
#e.capture = True
e.start()
#your app
e.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment