added support for mouse events while a touch screen is present, for computers with a touchscreen.
changed setListener function to exclude mouse events when onlyTouch flag is set