Skip to content

xfnty/tabd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tabd – minimal userspace driver for drawing tablets.

Developing

Compile using MSVC with 64-bit prompt enabled (32-bit evironment is not supported):

rc /nologo /i src /fo icon.res res\icon.rc
cl /nologo src\tabd.c icon.res /link /subsystem:windows /entry:_start

Running in the terminal:

start /b /wait tabd.exe

Delete intermediate files:

del /q /s /f *.exe *.obj *.zip *.ilk *.res *.pdb *.rdi 1> nul

Configuring presets

Preset settings are specified in preset.h file:

typedef struct {
    Vec2 center;
    Vec2 size;
    float rotation;
} ActiveArea; 

typedef enum {
    MODE_MOUSE,
    MODE_INK,
} OutputMode;

typedef struct {
    PCWSTR name;
    ActiveArea area;
    OutputMode mode;
} Preset;

const Preset g_presets[] = {
    { L"Drawing", { {108, 67.5},    {216, 135},         0 }, MODE_INK   },
    { L"Osu",     { {80.41049, 85}, {100, 56.222546}, -90 }, MODE_MOUSE },
};

Currently, preset values can not be changed at runtime.

They use the same values OpenTabletDriver does except that the first pair of values ({108, 67.5}) is preset center's XY coords and the second pair ({216, 135}) is the size of the area. Both pairs of values are in millimeters while rotation is in degrees.

Unlike in OTD, display area to which the tablet area is mapped to can not be configured.

The first preset in the list is used by default but can be changed by right-clicking on the tray icon and selecting another preset under "Presets" submenu.

Tablet Support

tabd uses the same machinery as HidSharpCore – one of OpenTabletDriver's dependencies.

To add support for new tablets see tablet.h and, if you want, OpenTabletDriver's parsers and configurations for tablets it supports.

For now, only Wacom CTL-672 tablet is supported.