This mobile detector doesn't require you to press a button all you need to do is move your mouse around a bit. If you're making a game that switches to mobile controls if you're on a phone you can have this run in the background on the main menu screen to detect the device. EXPLANATION: Scratch mobile basically uses a fake cursor and every time you tap the screen the cursor goes to that part of the screen and clicks, this means that every time your cursor moves it must click as well. This also means that if the mouse moves and doesn't click it must be PC. However I did find a weird way to swipe on mobile that is an exception to this rule. So I decided to have a system that detects how many times per second the cursor moves without clicking and if this reaches a certain threshold it must be on PC. If you're on mobile it's basically impossible to get it to say PC, especially if you don't know the detector is running. But if you're on PC you just have to hold down the mouse button while moving the mouse or move it incredibly slowly or right click before moving it however all of this probably won't happen if you don't know the detector is running. Also it's designed for you to not notice it running as it can run in the background while you're doing something else. Feel free to use this code in your project, just backpack the "Mobile detector" sprite and please make sure to give credit. CHANGES: 2022-10-16 : Fixes an issue on mobile involving dragging finger from outside the stage. 2021-08-23 : Initial upload