ScratchData LogoScratchData
Back to ThinkingPlanely's profile

Touchscreen Detector v1.3

THThinkingPlanely•Created August 22, 2022
Touchscreen Detector v1.3
152
118
2654 views
View on Scratch

Description

This project uses CSS Media Queries in an SVG file to detect if you have a mouse connected. To detect which pointer type you're currently using, it checks if the mouse pointer moves without being down. If so, then that means your using a mouse, otherwise you must be using a touchscreen. It also has a lot a validity detection and resets if something funny is going on. Known Bugs: - On a touchscreen laptop/PC, quickly holding one finger down, tapping another finger on the screen and moving the original finger will register as mouse. - In certain browsers, right clicking may register as a touchscreen. - Scrolling then clicking will sometimes register as touch. All my projects are dedicated to Jesus Christ. All praise be to him! "Trust in the LORD, and do good; dwell in the land and befriend faithfulness." - Psalms 37:3 Release Notes: v1.3 - Apr 13, 2023: Updated: - Project Ctrl - Terminology v1.2 - Dec 20, 2023: - Fixed detecting mouse when scrolling. (sort of) Updated: - Artwork. - project ctrl to v3.6 - Terminology. v1.1 - Nov 1, 2022: - Combined the 2-click touch sensor with the CSS to give more accurate results. v1.0 - Oct 29, 2022: - Totally redesigned to use CSS in SVG - Reduced to 10 blocks! v0.4 - Oct 23, 2022: - Improved performance - Added more comments v0.3 - Oct 4, 2022: - Changed terminology - Updated cover scripts v0.2 - Aug 17, 2022: - Totally redesigned to improve accuracy - Added a more advanced cover sprite Credits: Thanks to @Retr0id for showing how to use CSS in SVG. Used Linearity Curve to create thumbnail. Computer mouse symbol from Iconator. Keywords: input device detector input device sensor touchscreen sensor tablet detector tablet sensor phone detector phone sensor smartphone detector smartphone sensor mobile detector mobile sensor mouse detector mouse sensor pc detector pc sensor device detector device sensor pointer detector input type detector fine pointer detector coarse pointer detector

Project Details

Project ID724025106
CreatedAugust 22, 2022
Last ModifiedApril 13, 2024
SharedAugust 22, 2022
Visibilityvisible
CommentsAllowed