qDevice is a Roblox Luau package designed to detect platforms of most kinds on Roblox with ease and with a simple interface.
qDevice uses a lot of UserInputService logic in it that makes it impossible to use on the server. You can only use qDevice on the client. That is the only warning
This returns true if the orientation of a mobile device is in landscape mode. This is done by comparing screen size values and checking if the user has touch enabled.
This returns true if the orientation of a mobile device is in portrait mode. This is done by comparing screen size values and checking if the user has touch enabled.
This is a general function that will return a string based on the mode that it was detected to be in.
This returns true if the user is found to be on Xbox. This is done by checking the string for a keycode returning "ButtonA", as well as checking for Ten Foot Interface.
This is a similar implementation to IsXbox()
but by checking if a keycode will return "ButtonCross" as a string, also checking for Ten Foot Interface.
This returns true or false if the platform is any console, by checking for Ten Foot Interface.
Warning
This function is hacky. Like, sorta hacky. It checks if the X or Y values of the screen size are below 600 depending on orientation.
This will return a string that says "Phone" or "Tablet" depending on what it finds and for the orientation
This function will return true if it finds a phone.
This function will return true if it finds a phone
This returns true if it finds a VR headset active
This will find if a PC is active by checking against all other devices.
Note
This function is experimental (meaning that implementing this in production might be a big no-no.) Set QDEV_EXPERIMENTAL to true
to enable this.
This special function will look for if a controller is connected on PC.