Mouse class¶
Interface with the system mouse
This object is set as the default value for trajtracker.env.mouse
.
To receive location and clicks information from other devices (which do not behave like a mouse), you can create another implementation of the “Mouse” class.
Methods and properties:¶
-
class
trajtracker.io.
Mouse
(xpy_mouse)¶ -
__init__
(xpy_mouse)¶ Create a Mouse object
Parameters: xpy_mouse – Expyriment’s mouse object (from
Check whether a mouse button is currently pressed.
Parameters: button_number – 0 = main (left) button Returns: bool
-
log_level
¶ Logging level of this object: trajtracker.log_none, log_error (default), log_warn, log_info, log_debug, log_trace
-
position
¶ Get the current position of the mouse pointer
Returns: (x, y) coordinates
-
show_cursor
(show)¶ Show/hide the mouse pointer
Param: show
-