When touch emulation is enabled, both mouse and touch events get triggered causing duplicate events. Detect when touch is enabled and only use those events. Fix courtesy of https://github.com/archer96. Fixes #3