Recently I got a drawing tablet. One valued feature of this tablet is that it is pressure sensitive (2048 levels). No matter what the model, almost every company's tablet's features (like pressure) are compatible with well-known commercial products like Photoshop, and this is precisely what I'm wondering about:
If well-known graphic products can do it, how do I make my own program to recognize this device's features? How can I access/extract real-time data from a device. Assuming I have all driver stuff correctly installed.
I've been trying to google keywords like "[company] header files" or "[company] developing programs" or stuff like that to no avail... not really sure what to search for.
If you need specific information about the actual device, I will post it, but I'm also just looking for general knowledge about how to this type of thing, with any device.
(I'm not talking about a GUI or how to actually code graphics to respond to the pressure, just about receiving information from it.)
(I put this in general instead of Windows because a cross-compatible method would be better, so that I can test my program on Linux as well, although information for either OS would be greatly appreciated.)
Graphics tablets are in the broad category of devices called human interface device (HID). An HID may have any of a standard set of features that it may implement (e.g. a mouse is a pointing device that can produce clicks and may be able to scroll; a keyboard is a text input device; a graphics tablet is a pointing and clicking device that may produce pressure data). Any features covered by the HID standard can be handled by the OS alone and abstracted from the specifics of the device, so that any application that knows how to ask the OS for HID input can work with any HID. A device may have features not covered by the HID standard, but those will have to be handled specially by any software that uses them.