Mouse functionality sample
This file just shows a rudimentary method to handle the mouse. It is not guaranteed to even work. I do not recommend using the mouse.
If you really want mouse functionality, then you likely are using the wrong module. Try SDL or other X-Windows based library instead.