How would you detect if a user is on mobile

I’m wondering how you would detect if the user’s device is mobile or not

You have to actively set the text depending on the player’s active input source. If the player used touch, change the text to “Tap”, otherwise “Click”. Keyboard enabled tells us that the user is not on mobile because they have a keyboard.