8

I know this is a bit of perennial question, but here goes: I want to know whether the device my site is being accessed with is a touchscreen. That means phones and iPads, of course, which are individually detectable, but also other touchscreens that may well be running flavors of Windows. Any chance of determining the presence or absence of a mouse on those?

Let's say I'm willing to use a large JavaScript library like Modernizr. Will that help any?

Trevor Burnham
  • 74,631
  • 30
  • 153
  • 193

2 Answers2

2

You might want to look into MobileESP. Not touchscreens only, but it at least gives you some detection capabilities. From their page:

The MobileESP project seeks to provide web site developers an easy-to-use and lightweight API for detecting whether visitors are using a mobile device, and if so, what kind. The APIs provide simple boolean results for popular individual device OS categories (such as iPhone, BlackBerry, Symbian S60, and Windows Mobile), device capabilities (e.g., J2ME), and broad classes of devices, such as "iPhone Tier" (iPhone/Android/WebOS) and smartphones.

Gert Grenander
  • 16,088
  • 6
  • 37
  • 43
1

Try http://wurfl.sourceforge.net/ for device capabilities.

nLL
  • 5,572
  • 10
  • 48
  • 85