Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Device detecting
- amagamecode
-
Scratcher
500+ posts
Device detecting
Here are the blocks:
(device::#5a0cd1)//it will only show "PC" or "mobile"
<keyboard connected?::#5a0cd1>//Y'know, some PCs has touch screen and doesn't need keyboard, or some mobile devices can connect keyboard. It will show true if a keyboard is connected.
<using touch screen?::#5a0cd1>//This block is kinda special. If you're not using your mouse or touch screen, it will show "neither T or F"
<device is[mobile v]?::#5a0cd1>//credit: Thiago_le_meilleur | if the device is mobile, it will show true.
Last edited by amagamecode (July 12, 2025 00:24:35)
- Thiago_le_meilleur
-
Scratcher
1000+ posts
Device detecting
Here are the blocks:Here's a better one:(device::#5a0cd1)//it will only show "PC" or "mobile
device is [mobile v] :: #5a0cd1 boolean
- amagamecode
-
Scratcher
500+ posts
Device detecting
Thanks am gonna edit itHere are the blocks:Here's a better one:(device::#5a0cd1)//it will only show "PC" or "mobiledevice is [mobile v] :: #5a0cd1 boolean
- The-Animation-Pro
-
Scratcher
100+ posts
Device detecting
There is a scratch mod block that has
<mobile?::sensing>
Last edited by The-Animation-Pro (Dec. 15, 2025 23:51:59)
- Discussion Forums
- » Developing Scratch Extensions
-
» Device detecting