Creating Tablet Configurations - InfinityGhost/TabletDriver GitHub Wiki

Getting started

It is good to know right from the start a few things. These will be used later on to make the areas both accurate and perfectly shaped. The easiest way to obtain these is through the tablet's website under specifications.

  • Actual tablet area width (mm)
  • Actual tablet area height (mm)
  • Max X resolution (device "pixels")
  • Max Y resolution (device "pixels")
  • Report rate
  • Report length

An easy way to calculate the maximum X and Y resolutions (if they are not listed) is to use the LPI listed on the store page and use the following formulas:

MaxX = (width / 25.4) * LPI
MaxY = (height / 25.4) * LPI

After that, the first decision that matters quite a bit - picking a configuration type. The two types of configurations that are available currently:

  • USBTablet
  • HIDTablet

Note

This guide currently doesn't contain any advanced information (which may be required to get an optimal experience and correct sizes) such as buttons, masks, custom data, etc.

USBTablet

This is generally the easiest to set up, but can run into conflictions with other tablet configurations along the line. You will need to know this to set up your tablet:

  • GUID

Your tablet's GUID will be listed under the tablet's device properties in the "Details" tab, under the "Class Guid" property.

Device Manager, Wacom CTL-480 Properties

There are many cases where tablets use identical GUID's and may require more information in order to differentiate the tablets. This is very common with Huion tablets, but can occur on other brands as well. The easiest way it to use device strings. These can be acquired using the GetStrings command after you set up your tablet.

This command will work most of the time, and will fetch all of your device strings. A majority of the strings will be completely useless or blank, but generally there is something that will differentiate them. If it throws a bunch of errors, change the numbers around.

GetStrings 0 255

Once you find a string that you can use to differentiate the tablet. The CheckString command can be used for such. The syntax for the CheckString command is:

CheckString [string#] [compared string]

After you gain all of this information, you set up your tablet with the USBTablet command.

The syntax for the USBTablet command is as the following:

USBTablet [GUID]

HIDTablet

This type of tablet configuration may be soon deprecated. If you wish to use this format to set up the tablet configuration, you will need to know about your tablet:

  • VID
  • PID
  • HID Usage Page
  • HID Usage

The syntax for the HIDTablet command is as the following:

HIDTablet [VID] [PID] [HID Usage Page] [HID Usage]

General Formatting of Configurations

There is a general formatting of configurations that is required in order to have your configuration work properly and added to future releases, along with making sure everything is correctly measured. In some cases, the tablet specifications on the tablet's website may be inaccurate or not very precise and could lead to incorrect scaling on your configuration.

The general configuration for tablets is as the following: (remove all brackets and parenthesis, replacing with their respective values)

#
# [Tablet Name]
#
[TabletConfigurationType] [properties]
ReportId [id (byte)]
ReportLength [length]
Width [width]
Height [height]
MaxX [maxX]
MaxY [maxY]

Here are some examples:

USBTablet Example

#
# Huion 420
#
USBTablet "{62F12D4C-3431-4EFD-8DD7-8E9AAB18D30C}"
CheckString 6 "420"
Name "Huion 420"
ReportId 0x07
ReportLength 8
DetectMask 0x80
MaxX 8340
MaxY 4680
MaxPressure 2047
Width 105.918
Height 59.436

HIDTablet Example

#
# Wacom CTL-471
#
HIDTablet 0x056a 0x0300 0xFF0D 0x01
Name "Wacom CTL-471"
ReportLength 10
DetectMask 0x40
MaxX 15200
MaxY 9500
MaxPressure 1023
Width 152.00
Height 95.00